all repos — nixfiles @ 1f7dd7ec5b9fb18a9a42138de3677b03ad9da387

System and user configuration, managed by nix and home-manager

nextdns: support local DNS lookups (based on common router IPs)
Alan Pearce alan@alanpearce.eu
Thu, 10 Sep 2020 15:00:31 +0200
commit

1f7dd7ec5b9fb18a9a42138de3677b03ad9da387

parent

56a7dc354602d54324a9cda7ce9121d53beaa05e

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M system/modules/nextdns.nixsystem/modules/nextdns.nix
@@ -13,7 +13,16 @@ kresdConfig = {     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'},