OPNsense Forum

English Forums => General Discussion => Topic started by: S1ardust on September 19, 2026, 09:18:50 AM

Title: Unbound DNS hard restarts (clearing cache) on LAN link disable
Post by: S1ardust on September 19, 2026, 09:18:50 AM
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 Cause
Whenever 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 Topology
OPNsense-Diagram.png

What I Have Already Tried (Without Success)

To prevent the Unbound restart on link-up, I have already tested the following:



Any advice or pointers would be highly appreciated!

Thank you