Skip to content

Instantly share code, notes, and snippets.

@amphineko
Created November 15, 2020 04:22
Show Gist options
  • Save amphineko/d92b7320b1cf166236e637504357dadd to your computer and use it in GitHub Desktop.
Save amphineko/d92b7320b1cf166236e637504357dadd to your computer and use it in GitHub Desktop.
print('Knot Resolver ' .. package_version())
modules = {
'bogus_log',
'hints',
'predict',
'prefill',
'workarounds < iterate',
}
-- listen
net.listen('0.0.0.0')
net.listen('::')
net.ipv6 = false
-- cache
cache.open(32 * MB, 'lmdb:///tmp/kresd-cache')
cache.clear()
-- hints
hints.root_file('/usr/share/dns-root-hints/named.root')
-- dnssec
--trust_anchors.add_file('/etc/knot-resolver/trusted-key.key')
--trust_anchors.remove('.')
mode('permissive')
-- policies
policy.add(policy.pattern(policy.PASS, todname('.')))
--policy.add(policy.all(policy.FORWARD({'1.1.1.1', '1.0.0.1'})))
--policy.add(policy.all(policy.FORWARD({'223.5.5.5', '223.6.6.6'})))
--policy.add(policy.all(policy.TLS_FORWARD({
-- { '1.1.1.1', hostname='dns.cloudflare-dns.com' },
-- { '1.0.0.1', hostname='dns.cloudflare-dns.com' },
--})))
policy.add(policy.all(policy.TLS_FORWARD({
{ '223.5.5.5', hostname='dns.alidns.com' },
{ '223.6.6.6', hostname='dns.alidns.com' },
})))
-- prediction
predict.config({
period=0,
period=24*(60/15),
window=30
})
-- prefill
prefill.config({
['.'] = {
url = 'https://www.internic.net/domain/root.zone',
interval = 86400
}
})
-- metrics
--modules.load('graphite')
--graphite.config({
-- prefix = 'kresd',
-- host = 'metrics_influxdb.metrics_collect',
-- port = 2003,
-- interval = 5 * sec,
-- tcp = true
--})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment