coldfire7

/etc/knot-resolver/kresd.conf

Jul 12th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. -- root@two-pihole:~# cat /etc/knot-resolver/kresd.conf
  2. -- SPDX-License-Identifier: CC0-1.0
  3. -- vim:syntax=lua:set ts=4 sw=4:
  4. -- Refer to manual: https://knot-resolver.readthedocs.org/en/stable/
  5.  
  6. -- Network interface configuration
  7. net.listen('127.53.53.4', 5304, { kind = 'dns' })
  8. -- net.listen('127.53.53.4', 853, { kind = 'tls' })
  9. -- net.listen('::1', 5304, { kind = 'dns', freebind = true })
  10. -- net.listen('::1', 853, { kind = 'tls', freebind = true })
  11.  
  12. -- Enable optional modules
  13. modules = {
  14. 'policy',
  15. 'view',
  16. 'hints',
  17. 'serve_stale < cache',
  18. 'workarounds < iterate',
  19. 'stats',
  20. 'predict'
  21. }
  22.  
  23. -- Accept all requests from these subnets
  24. view:addr('127.0.0.0/8', function (req, qry) return policy.PASS end)
  25. view:addr('[::1]/128', function (req, qry) return policy.PASS end)
  26.  
  27. -- Drop everything that hasn't matched
  28. view:addr('0.0.0.0/0', function (req, qry) return policy.DROP end)
  29.  
  30. -- Forward queries encrypted to Cloudflared over TLS
  31. policy.add(policy.all(policy.TLS_FORWARD({
  32. { '1.1.1.1', hostname='cloudflare-dns.com', ca_file='/etc/ssl/certs/ca-certificates.crt' },
  33. { '1.0.0.1', hostname='cloudflare-dns.com', ca_file='/etc/ssl/certs/ca-certificates.crt' },
  34.  
  35. })))
  36.  
  37. -- Forward queries encrypted to Quad9 over TLS
  38. -- policy.add(policy.all(policy.TLS_FORWARD({
  39. -- { '9.9.9.9', hostname='dns.quad9.net', ca_file='/etc/ssl/certs/ca-certificates.crt' },
  40. --
  41. -- })))
  42.  
  43. -- Prefetch learning (15-minutes blocks over 24 hours)
  44. predict.config({ window = 15, period = 72 })
  45.  
  46. -- Cache size
  47. cache.size = 250 * MB
  48.  
  49. -- Enable DNSSEC validation
  50. -- trust_anchors.file = '/etc/knot-resolver/root.keys'
  51.  
  52. -- deescalate from root
  53. -- user("knot-resolver", "knot-resolver")
Add Comment
Please, Sign In to add comment