Hi everyone,
I am running OPNsense on my network for some weeks now and I am facing an annoying issue where
Unbound DNS performs a hard restart (losing its entire cache and resetting uptime to 0) every time my Windows 11 client disconnects from the LAN.
For reasons, I programmatically disable the network adapter on the Windows 11 client multiple times a day via
Disable-NetAdapter.
The Phenomenon & Root CauseWhenever the client disconnects, the virtualized OPNsense (running on Hyper-V) registers a physical link-loss on the LAN interface (hn1). The subsequent link-up triggers the system script
/usr/local/etc/rc.newwanip, which forces a global Unbound restart.
Log output From "
System -> Log Files -> General" (or via
clog /var/log/system.log):
hn1: link state changed to DOWN (When disabling the client adapter)
hn1: link state changed to UP (When re-enabling the client adapter)
[... followed by rc.newwanip triggering the Unbound restart ...]
Network TopologyOPNsense-Diagram.png
What I Have Already Tried (Without Success)To prevent the Unbound restart on link-up, I have already tested the following:
- Tested the setting "Flush DNS cache during reload"
- Prevent interface removal: Activated under "Interfaces -> [LAN]".
- Unbound Network Interfaces: Bound to "All" instead of specific interfaces.
- System Tunables: Set com.opnsense.disable_interface_cycle = 1.
- ...
Any advice or pointers would be highly appreciated!
Thank you