OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: ZPrime on June 24, 2022, 07:47:42 am

Title: Unbound - all IPs (WAN+LAN) shown as A records for local hostname
Post by: ZPrime on June 24, 2022, 07:47:42 am
This was happening on 22.1.8 and is still happening after upgrading to 22.1.9. Unfortunately I'm not exactly sure when it started happening. I noticed it after I changed the router's hostname (while still running 22.1.8 ).

I have dual-WAN, plus a LAN interface, and an OPT/secondary LAN that is disabled most of the time (but does have a static IP).

I'm using a subdomain of a public domain (that I own) for my LAN, and my opnsense machine is named "router.bh.example.net"  (example.net is standing in for my public domain here).

If I use dig against the router's hostname from my LAN, it is returning not only the LAN IP, but also the OPT, and both WAN IPs.

This is obviously somewhat of a problem because then hosts on the LAN aren't sure which IP to try to access for HTTPS / ping / etc.

I'm able to "fix" this by changing Services -> Unbound DNS -> General -> "Network Interfaces" to only list my LAN interface... but this is not desirable if I should ever want to use the OPT/secondary LAN. I don't want both interfaces to have the same hostname, and I definitely don't want public WAN IPs being resolved (internally) to the LAN hostname of the system.

I'm fairly sure Unbound / OPNsense didn't have this behavior in the past, as I think I would've run into problems trying to ping router.bh.example.net otherwise. Anybody else noticing this?