1
General Discussion / Re: Unbound DNS returning DHCP4 host IP even with Override set
« on: September 21, 2024, 07:01:36 pm »
I finished transitioning from .net to .com so the original issues isn't quite relevant any more. Although another instance of Overrides seemingly not having the highest priority as come up.
Yes some interfaces on Opnsense have static (internal servers: IDM, NAS, etc) but some are dynamic (laptop, guests, etc). While having DNS resolution for the laptops etc is not strictly required it is a nice to have since resolving them by hostname is quicker if I need to SSH into them etc. Also I'd prefer to not have to manually add every computer / device to a static mapping.
Now OPNsense.domain.com. Which annoyingly even with an override the DNS lookup results in all of the gateways being returned instead of it's management IP.
Blank, so it uses the system default of domain.com
domain.com
I'm not sure why DHCP entries are trumping overrides, it seems like override should be resolved first but that does not seem to be the case. As for opnsense resolving to all it's gateways I was able to solve that issue. I simply unchecked the "Do not register system A/AAAA records".
While that fixed it, I would still have expected overrides to have returned first, otherwise this note on the overrides page is not correct. "Entries in this section override individual results from the forwarders. Use these for changing DNS results or for adding custom DNS records. Keep in mind that all resource record types (i.e. A, AAAA, MX, etc. records) of a specified host below are being overwritten." It is cearly not override ALL records, just most.
Quote
I'm a bit confused about your "DHCP static" and "DHCP4 Lease".... do you have static mappings for some server instances, but others getting DHCP addresses from a pool and specifying their own preferred hostname? or...?
Yes some interfaces on Opnsense have static (internal servers: IDM, NAS, etc) but some are dynamic (laptop, guests, etc). While having DNS resolution for the laptops etc is not strictly required it is a nice to have since resolving them by hostname is quicker if I need to SSH into them etc. Also I'd prefer to not have to manually add every computer / device to a static mapping.
Quote
What is your system Domain Name? (System -> Settings -> General -> Domain Name)
Now OPNsense.domain.com. Which annoyingly even with an override the DNS lookup results in all of the gateways being returned instead of it's management IP.
Quote
# nslookup opnsense.domain.com 192.168.40.1
Server: 192.168.40.1
Address: 192.168.40.1#53
Name: opnsense.domain.com
Address: 192.168.100.1
Name: opnsense.domain.com
Address: 192.168.20.1
Name: opnsense.domain.com
Address: 192.168.40.1
Name: opnsense.domain.com
Address: 192.168.1.1
Name: opnsense.domain.com
Address: 192.168.1.250
Name: opnsense.domain.com
Address: 192.168.10.1
Name: opnsense.domain.com
Address: 192.168.30.1
Quote
What is the Domain Name for the DHCP service? (Services -> ISC DHCPv4 -> [interface] -> Domain Name)
Blank, so it uses the system default of domain.com
Quote
What is the Domain Name for the Static Mappings? (it's an optional setting for each one)
domain.com
I'm not sure why DHCP entries are trumping overrides, it seems like override should be resolved first but that does not seem to be the case. As for opnsense resolving to all it's gateways I was able to solve that issue. I simply unchecked the "Do not register system A/AAAA records".
While that fixed it, I would still have expected overrides to have returned first, otherwise this note on the overrides page is not correct. "Entries in this section override individual results from the forwarders. Use these for changing DNS results or for adding custom DNS records. Keep in mind that all resource record types (i.e. A, AAAA, MX, etc. records) of a specified host below are being overwritten." It is cearly not override ALL records, just most.