kresd.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. -- SPDX-License-Identifier: CC0-1.0
  2. -- vim:syntax=lua:set ts=4 sw=4:
  3. -- Refer to manual: https://knot-resolver.readthedocs.org/en/stable/
  4. -- visit https://knot-resolver.readthedocs.io/en/stable/config-logging-monitoring.html for more info
  5. log_level('info')
  6. -- Network interface configuration
  7. net.listen('127.0.0.1', 5353, { kind = 'dns' })
  8. net.listen('::1', 5353, { kind = 'dns', freebind = true })
  9. -- Load useful modules
  10. modules = {
  11. 'hints > iterate', -- Load /etc/hosts and allow custom root hints
  12. 'stats', -- Track internal statistics
  13. 'predict', -- Prefetch expiring/frequent records
  14. }
  15. --- Cache size https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#sizing
  16. -- "For personal and small office use-cases cache size around 100 MB is more than enough." -cz.nic
  17. cache.size = 50 * MB
  18. -- policy help : https://knot-resolver.readthedocs.io/en/stable/modules-policy.html
  19. -- This is Just a Blocklist
  20. policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minopallow.txt',true))
  21. policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/adguard-exceptions.txt',true))
  22. policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minoplhyallowlist.txt',true))
  23. policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minopdeny.txt',true))
  24. policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minoplhy.txt',true))
  25. policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minoplhyneto.txt',true))
  26. policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-ultimate.txt',true))