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-08-27 14:39:32 +00:00
|
|
|
-- visit https://knot-resolver.readthedocs.io/en/stable/config-logging-monitoring.html for more info
|
|
|
|
log_level('info')
|
2021-01-01 12:14:50 +00:00
|
|
|
-- Network interface configuration
|
|
|
|
net.listen('127.0.0.1', 5353, { kind = 'dns' })
|
|
|
|
net.listen('::1', 5353, { kind = 'dns', freebind = true })
|
2021-08-15 09:28:49 +00:00
|
|
|
net.listen('0.0.0.0', 53, { kind = 'dns' })
|
|
|
|
net.listen('::', 53, { kind = 'dns', freebind = true })
|
2021-01-01 12:14:50 +00:00
|
|
|
|
2021-08-28 06:31:03 +00:00
|
|
|
|
2021-01-01 12:14:50 +00:00
|
|
|
-- Load useful modules
|
|
|
|
modules = {
|
2021-08-28 06:31:03 +00:00
|
|
|
'hints > iterate', -- Load /etc/hosts and allow custom root hints
|
|
|
|
'stats', -- Track internal statistics
|
|
|
|
'predict', -- Prefetch expiring/frequent records
|
|
|
|
'policy'
|
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-08-28 06:31:03 +00:00
|
|
|
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minopallow.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/adguard-exceptions.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.PASS, '/etc/knot-resolver/list/minoplhyallowlist.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minopdeny.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minoplhy.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/minoplhyneto.txt',true))
|
|
|
|
policy.add(policy.rpz(policy.REFUSE, '/etc/knot-resolver/list/energized-ultimate.txt',true))
|
|
|
|
|
|
|
|
policy.add(policy.all(
|
|
|
|
policy.TLS_FORWARD({
|
|
|
|
-- multiple servers can be specified for a single slice
|
|
|
|
-- the one with lowest round-trip time will be used
|
|
|
|
--
|
|
|
|
-- You can changes this as your choices address below is DOT
|
2021-08-28 06:33:05 +00:00
|
|
|
-- and there's other protocol available on : https://knot-resolver.readthedocs.io/en/stable/config-network-forwarding.html
|
2021-08-28 06:31:03 +00:00
|
|
|
{'9.9.9.9', hostname='dns.quad9.net'},
|
|
|
|
{'2620:fe::fe', hostname='dns.quad9.net'},
|
|
|
|
})
|
|
|
|
))
|
|
|
|
|