Attempt to index global 'policy'
Hello,
I am attempting to setup DNS forwarding using policy module. But I am getting this error /etc/knot-resolver/kresd.conf:27: attempt to index global 'policy' (a nil value)
.
Thank you in advance.
This is my config:
-- load modules
modules = {
policy,
view,
version,
stats,
predict = {
-- 15 minutes sampling window
window = 15,
-- track last 31 days
period = 31 * 24 * (60 / 15)
},
hints = "/etc/knot-resolver/static.hosts",
http = {
host = "local.resolver",
port = 8053,
cert = false,
geoip = "/etc/knot-resolver/GeoLite2-City.mmdb"
}
}
-- setup forwarding
policy.add(policy.all(policy.FORWARD("217.31.204.130")))
-- policy.add(policy.all(policy.FORWARD("2001:1488:800:400::130")))
-- deescalate from root
user("knot-resolver", "knot-resolver")
-- setup cache
cache.storage = "lmdb:///run/knot-resolver/cache"
cache.size = 100 * MB
-- set mode
mode("normal")
-- setup trust anchors for DNSSEC
trust_anchors.file = "/usr/share/dns/root.key"