DNSserver/configuration/kresd.conf

33 lines
1.7 KiB
Lua

-- SPDX-License-Identifier: CC0-1.0
-- vim:syntax=lua:set ts=4 sw=4:
-- Refer to manual: https://knot-resolver.readthedocs.org/en/stable/
-- This Will Keep Log Disable (false) will stop this.
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 = {
'hints > iterate', -- Load /etc/hosts and allow custom root hints
'stats', -- Track internal statistics
'predict', -- Prefetch expiring/frequent records
}
--- Cache size https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#sizing
-- "For personal and small office use-cases cache size around 100 MB is more than enough." -cz.nic
cache.size = 50 * MB
-- policy help : https://knot-resolver.readthedocs.io/en/stable/modules-policy.html
-- This is Just a Blocklist
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minopallow.rpz',true))
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/adguard-exceptions.rpz',true))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minoplhy-privatebuild.rpz',true))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minopdeny.rpz',true))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-regional.rpz',true))
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))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minop-cname-cloaking.rpz',true))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/ad-cname-tracker.rpz',true))