DNSserver/configuration/kresd.conf

30 lines
1.4 KiB
Plaintext
Raw Normal View History

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/
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
}
2021-01-02 10:07:33 +00:00
-- Cache size https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html#sizing
2021-01-01 12:14:50 +00:00
cache.size = 100 * MB
-- policy help : https://knot-resolver.readthedocs.io/en/stable/modules-policy.html
-- This is Just a Blocklist
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/denylist.rpz',true))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/oisd.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))
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-regional.rpz',true))
2021-01-01 12:14:50 +00:00
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/allowlist.rpz',true))
policy.add(policy.all(policy.QTRACE))