/etc/resolv.conf cleared from time to time, breaking opnsense internet access?

Started by random_skrub, June 21, 2024, 09:19:34 AM

Previous topic - Next topic
Hi there,

Just set up opnsense as my main router / FW in a virtualized fashion, and it's working fine, until recently.

Did 2 things today which might have broken opnsense host's own DNS settings - from time to time /etc/resolv.conf would be emptied, leaving no DNS nameservers left. I would have to manually append nameservers to get opnsense's own internet connectivity back.

These 2 things were
- set up Wireguard selective routing over a subnet / VLAN (for a guest SSID), which I think is unlikely
- followed https://windgate.net/setup-adguard-home-opnsense-adblocker/ < this tutorial to set up AGH on one of the VLANs to use Unbound as the sole resolver (higher chance)

What differs from the tutorial is that my AGH instance lives on another VM in Proxmox. Still, it seems to work fine and I followed the tutorial and changed Unbound's listening port. The plan is to hardcode public DNS on other DHCP servers while the main net would use AGH as DNS.

I kind of want to do the same just for opnsense itself, but I don't know if there's an option in WebUI.

Please advise. Thanks!

Ended up adding AGH IP to System settings. I was wary of the warning it may impact "DHCP servers" and all, but we'll see if it indeed breaks stuff.