summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--system/modules/nextdns.nix9
1 files changed, 9 insertions, 0 deletions
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'},