DNS forwarding stops working

DNS forwarding stops working after each TO reboot. Forwarding is still checked in Foris, but the DNS leak test (https://www.perfect-privacy.com/dns-leaktest/) shows my ISP’s DNS, not the forwarded one. Temporary solution? After each reboot I have to uncheck forwarding in Foris, click 'Save", check it again and save, then it begins to work properly. This is surely uncomfortable.
Some sites in Chrome resolve much slower without DNS forwarding.

1 Like

It looks like you’ve discovered a new bug :wink:

The kresd starts sooner than the wan is up, and by that time, there are no known DNS servers to forward to. Because of that, there is a hotplug hook restarting the resolver after changing status of a interface. But only for Unbound. And what’s more, it doesn’t work with the current unbound setup because it links to the /etc/config/unbound instead of /etc/config/resolver.

1 Like

I’ve tried to fix it here: https://github.com/CZ-NIC/turris-os-packages/pull/13

If you are brave enough, feel free to edit the initscripts yourself (do schnapps create before). My WAN interface gets up before the resolver so I’m not hitting the issue either, so testing from you would be a good feedback.

I had the same issue. I tried your fix and I can confirm that now after a reboot the FORWARD lines appear in /tmp/kresd.config, whereas before I had to disable and re-enable the relevant option in foris. Thanks for the quick fix.

I would eagerly try your fix, but I’m a ssh newbie here, using only GUI’s on OpenWRT for years :frowning: What files should I edit and how?

  1. create new file named /etc/hotplug.d/iface/40-resolver-reload with this contents.
  2. add this line to /etc/init.d/kresd

That should be enough.

1 Like

Solved! Thank you! :smiley:

The bug came back :frowning: DNS forwarding stops working after several reboots.

And again… I have to re-enable it to make it work :frowning:

Can’t this be fixed? :cry:

If the address-set you need to forward to is stable, it should help you to hard-code them into your config, as a work-around.

Could be, but it is not quite the solution I would wish to have. This should work by design. Now, after each reboot, I have to re-enable forwarding in Foris to make it work.

Yes, of course it should. I meant something to use in the meantime…