OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: ischilling on September 28, 2023, 12:02:54 PM

Title: Unbound not starting after reboot
Post by: ischilling on September 28, 2023, 12:02:54 PM
If you configure Network Interfaces in Unbound DNS/General to use specific Interfaces and if you are using IPv6, Unbound DNS does not start...

When trying unbound -c /var/unbound/unbound.conf it appears that unbound can't bind (a) IP adress(es)...

The issue is the same as I described it under https://forum.opnsense.org/index.php?topic=33815.msg176314#msg176314 (https://forum.opnsense.org/index.php?topic=33815.msg176314#msg176314). Due to the IPv6 configuration and (correct) protocol behavior and a - as I see it meanwhile bug in the current Interface, the Webconfigurator does, replicable, add a dynamic IPv6 address per interface to the configuration.

If, at reboot for example, the dynamic IPv6 changes (which is in default IPv6 configurations very likely and according to the protocol, wished / accepted), the configuration doesn't... unfortunate that the IP is then not existing on the specified interface and therefore the service can't bind it...

The issue does not appear if you leave Network Interfaces to reply on all interfaces. And again, the drop-down behavior is buggy, it does save 'changes' as described in the linked forum entry above :(

Temporarily work-around:
* fix the configuration file
* don't open the Webconfiguration Page of Unbound DNS
Title: Re: Unbound not starting after reboot
Post by: Patrick M. Hausen on September 28, 2023, 12:08:00 PM
Quote from: ischilling on September 28, 2023, 12:02:54 PM
If you configure Network Interfaces in Unbound DNS/General to use specific Interfaces  ...

Just don't do that if you have any dynamic address or other frequent interface changes. There is no reason to.

Leaving the setting at "all" leads to Unbound listening on INADDR_ANY and IN6ADDR_ANY which is stable across interface changes. Which is the point and the reason why the UI says "recommended".
Title: Re: Unbound not starting after reboot
Post by: ischilling on September 29, 2023, 11:33:04 AM
Actually, the system has only fixed IPs.

However, I haven't yet found out how to make it not acquiring an IPv6 in addition per interface - hence either there is the chance to set this (somewhere) and not in form of an OS configuration which is not saved, or at least from my point of view, the whole "Interface" selection is, in terms of IPv6, buggy.