After a reboot Unbound denys requests on the WireGuard interface. It a normal behavior, because the WG-interface is not yet ready when the unbound service starts after a reboot.Simply go to Services/Unbound/Access Lists and add your WireGuard Subnet. Then it should work.
Quote from: Andi75 on March 26, 2023, 10:18:07 pmAfter a reboot Unbound denys requests on the WireGuard interface. It a normal behavior, because the WG-interface is not yet ready when the unbound service starts after a reboot.Simply go to Services/Unbound/Access Lists and add your WireGuard Subnet. Then it should work.Should have mentioned I've tried that, sorry. No change, and Wireguard subnet is already present as an Internal allowed subnet even after reboot. But adding it again manually doesn't help.
Quote from: Kinerg on March 27, 2023, 02:30:06 amQuote from: Andi75 on March 26, 2023, 10:18:07 pmAfter a reboot Unbound denys requests on the WireGuard interface. It a normal behavior, because the WG-interface is not yet ready when the unbound service starts after a reboot.Simply go to Services/Unbound/Access Lists and add your WireGuard Subnet. Then it should work.Should have mentioned I've tried that, sorry. No change, and Wireguard subnet is already present as an Internal allowed subnet even after reboot. But adding it again manually doesn't help.Can you post a screenshot? I had the same problem a while back and adding it manually solved my problem.
Quote from: CJRoss on May 19, 2023, 03:04:10 pmQuote from: Kinerg on March 27, 2023, 02:30:06 amQuote from: Andi75 on March 26, 2023, 10:18:07 pmAfter a reboot Unbound denys requests on the WireGuard interface. It a normal behavior, because the WG-interface is not yet ready when the unbound service starts after a reboot.Simply go to Services/Unbound/Access Lists and add your WireGuard Subnet. Then it should work.Should have mentioned I've tried that, sorry. No change, and Wireguard subnet is already present as an Internal allowed subnet even after reboot. But adding it again manually doesn't help.Can you post a screenshot? I had the same problem a while back and adding it manually solved my problem.Sure. First is the Unbound ACL list after reboot. Second is the manual ACL rule. Third is the ACL list after reboot with the manual rule added.End result is the same and Unbound restart is required.
Quote from: Kinerg on May 19, 2023, 09:38:19 pmQuote from: CJRoss on May 19, 2023, 03:04:10 pmQuote from: Kinerg on March 27, 2023, 02:30:06 amQuote from: Andi75 on March 26, 2023, 10:18:07 pmAfter a reboot Unbound denys requests on the WireGuard interface. It a normal behavior, because the WG-interface is not yet ready when the unbound service starts after a reboot.Simply go to Services/Unbound/Access Lists and add your WireGuard Subnet. Then it should work.Should have mentioned I've tried that, sorry. No change, and Wireguard subnet is already present as an Internal allowed subnet even after reboot. But adding it again manually doesn't help.Can you post a screenshot? I had the same problem a while back and adding it manually solved my problem.Sure. First is the Unbound ACL list after reboot. Second is the manual ACL rule. Third is the ACL list after reboot with the manual rule added.End result is the same and Unbound restart is required.So the third screenshot is the current configuration and when you reboot OPNSense you still can't get DNS?
Did you set unbound to listen on all interfaces?
Any idea how to fix it while keeping Unbound active only on selected interfaces? I'd rather keep doing the manual restarts if nothing else is possible.
Yep unbound failed to bind to an interface when it was not ready, hence needs restarting. You can set unbound to listen on all interfaces(inaddr_any) to prevent such issue and unbound will happily serve all current and future interfaces you might create, irrespective of their states.
Unbound works best with static interfaces, so you may want to pick an address from one of your static interfaces (eg:LAN) and use it as DNS for your WG clients.Or if you are paranoid, you can always create a loopback interface, assign a RFC1918/32 address and make unbound only listen to this interface. This way you don't have auto-added ACLs all over the place and can 'slim down' your firewall rules in one interface.
Today, it's "paranoid", tomorrow it's "pro-active" at best... Has been so the last (1)25 years, will always be that way... ;-)
Is it expected to have the WireGuard network in the Unbound ACL even if the WireGuard interface wasn't ready at Unbound's initial start?
That would still require special firewall rules for each interface to (dis)allow routing, wouldn't it?