2021-01-01 12:14:50 +00:00
|
|
|
-- SPDX-License-Identifier: CC0-1.0
|
|
|
|
-- vim:syntax=lua:set ts=4 sw=4:
|
|
|
|
-- Refer to manual: https://knot-resolver.readthedocs.org/en/stable/
|
|
|
|
|
2021-01-28 09:47:24 +00:00
|
|
|
-- This Will Keep Log Disable (false) will stop this.
|
2021-01-01 12:14:50 +00:00
|
|
|
verbose(true)
|
|
|
|
-- Network interface configuration
|
|
|
|
net.listen('127.0.0.1', 5353, { kind = 'dns' })
|
|
|
|
net.listen('::1', 5353, { kind = 'dns', freebind = true })
|
|
|
|
|
|
|
|
-- Load useful modules
|
|
|
|
modules = {
|
2021-05-27 00:14:18 +00:00
|
|
|
'hints > iterate', -- Load /etc/hosts and allow custom root hints
|
|
|
|
'stats', -- Track internal statistics
|
|
|
|
'predict', -- Prefetch expiring/frequent records
|
2021-01-01 12:14:50 +00:00
|
|
|
}
|
|
|
|
|
2021-05-27 00:14:18 +00:00
|
|
|
--- Cache size https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#sizing
|
2021-01-02 14:48:07 +00:00
|
|
|
-- "For personal and small office use-cases cache size around 100 MB is more than enough." -cz.nic
|
2021-05-27 00:14:18 +00:00
|
|
|
cache.size = 50 * MB
|
2021-01-01 12:14:50 +00:00
|
|
|
|
|
|
|
-- policy help : https://knot-resolver.readthedocs.io/en/stable/modules-policy.html
|
|
|
|
-- This is Just a Blocklist
|
2021-01-28 09:38:05 +00:00
|
|
|
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minopallow.rpz',true))
|
2021-05-27 00:14:18 +00:00
|
|
|
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/adguard-exceptions.rpz',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/adguard-dns.rpz',true))
|
2021-01-28 09:38:05 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minopdeny.rpz',true))
|
2021-01-02 14:35:18 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-ultimate.rpz',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/pgl-adserver.rpz',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-social.rpz',true))
|
2021-05-27 00:14:18 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-regional.rpz',true))
|
2021-01-03 10:21:47 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/urlhaus-abuse_ch.rpz',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-xtreme.rpz',true))
|
2021-05-27 00:14:18 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/1host-domains-pro.rpz',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/1host-wildcards-pro.rpz',true))
|
2021-02-25 12:56:09 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minop-cname-cloaking.rpz',true))
|
2021-03-21 04:03:42 +00:00
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/ad-cname-tracker.rpz',true))
|