OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: binoix on May 30, 2022, 12:07:48 PM

Title: Unbound not listenning on Wireguard interface at boot
Post by: binoix on May 30, 2022, 12:07:48 PM
Hello,

I have set Unbound to listen on All interfaces.
I have defined the Wireguard interface as static.

Yet at each reboot, Unbound is not listenning on the wireguard interface, and I have to restart Unbound for this to work on wireguard interface.
Would is be possible that Unbound is started *before* wireguard interface is up and hence does not take it into account?

Any ideas?

Thanks !
Title: Re: Unbound not listenning on Wireguard interface at boot
Post by: franco on June 02, 2022, 11:09:45 AM
The ACL entry is missing after boot. It cannot be generated automatically before wireguard is up, which is after unbound is up. Unfortunately unbound is not capable of runtime reconfiguration for ACL so that unbound needs to be restarted which we don't do by default to prevent resolution disruption (and possible cache flush) on any wireguard up and down.


Cheers,
Franco
Title: Re: Unbound not listenning on Wireguard interface at boot
Post by: binoix on June 02, 2022, 01:28:50 PM
Thank you Franco for the explanation !
Title: Re: Unbound not listenning on Wireguard interface at boot
Post by: franco on June 02, 2022, 01:30:20 PM
(a manual ACL entry for the wireguard subnet should work)
Title: Re: Unbound not listenning on Wireguard interface at boot
Post by: Patrick M. Hausen on June 02, 2022, 02:44:22 PM
Another approach that I am taking with BIND, because it is even more finicky about interfaces and IP addresses coming and going than Unbound, is to bind the server to 127.0.0.1 only and use port forwarding NAT rules on each interface that shall be accessible for clients. Also helps greatly with HA setups and virtual IP addresses.