Using these steps we will forward DNS zone <FORWAREDED ZONE>
to DNS server <DNS SERVER>
that actually holds the zone.
At first we need to create custom configuration file named /etc/kresd/custom.conf
that will be then appended to default configuration file with this content:
local forward_rule = policy.add(policy.suffix(policy.FORWARD('<DNS SERVER>'), policy.todnames({'<FORWARDED ZONE>'}))) policy.del(forward_rule.id) table.insert(policy.rules, 1, forward_rule)
As this configuration file is appended at the end of the generated configuration we have to remove the rule and then force it to first position as last configuration option in default turris configuration redirects everything to upstream DNS servers effectively causing to ignore any policy added in custom configuration.
Then edit /etc/config/resolver
file and at the end of the section config resolver 'kresd
add line
option include_config '/etc/kresd/config.conf'
And restart Knot DNS server by
/etc/init.d/kresd restart
Generated configuration file that is actually used is stored in temporary file /tmp/kresd.config
.