nextdns: support local DNS lookups (based on common router IPs)
Alan Pearce alan@alanpearce.eu
Thu, 10 Sep 2020 15:00:31 +0200
1 files changed, 9 insertions(+), 0 deletions(-)
jump to
M system/modules/nextdns.nix → system/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'},