From 1f7dd7ec5b9fb18a9a42138de3677b03ad9da387 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 10 Sep 2020 15:00:31 +0200 Subject: nextdns: support local DNS lookups (based on common router IPs) --- system/modules/nextdns.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'system') diff --git a/system/modules/nextdns.nix b/system/modules/nextdns.nix index ae7f6852..fabfb7cc 100644 --- a/system/modules/nextdns.nix +++ b/system/modules/nextdns.nix @@ -13,7 +13,16 @@ let enable = true; extraConfig = '' modules = { 'hints > iterate' } + localTrees = policy.todnames({ + 'lan.', + 'home.', + '10.in-addr.arpa.', + '172.in-addr.arpa.', + '192.in-addr.arpa.' + }) hints.add_hosts() + policy.add(policy.suffix(policy.FLAGS({'NO_CACHE'}), localTrees)) + policy.add(policy.suffix(policy.STUB({ '192.168.0.1', '192.168.1.1', '172.30.42.1', '10.0.0.1' }), localTrees)) policy.add(policy.all(policy.TLS_FORWARD({ {'45.90.28.0', hostname='${identifyingPrefix}${cfg.configID}.dns1.nextdns.io'}, {'2a07:a8c0::', hostname='${identifyingPrefix}${cfg.configID}.dns1.nextdns.io'}, -- cgit 1.4.1