[RESOLVED] Unbound won't release/update incorrect PTR record
I can't find where Unbound is getting a particular incorrect PTR record.
If I DNS lookup (from within pfSense):
it incorrectly resolves back to PTR record Aaron-iPhone.<domain>.home. It should resolve to AWS-09.<domain>.home
The host with IP 10.1.1.39 is really a PC named AWS-09.<domain>.home. If I DNS lookup (from within pfSense) aws-09 or aws-09.<domain>.home it correctly returns A record of 10.1.1.31.
Unbound is NOT configured for forwarding mode and my DNS servers at SYSTEM >> General Setup are empty. When doing DNS lookup I can see the only "local" server it's looking for answers at is 127.0.0.1.
I do have the following domain overrides:
1.1.10.in-addr.arpa 10.1.1.100 Reverse DNS to AD DNS AWS-Server.<domain>.home
<domain>.home 10.1.1.100 DNS to AD DNS AWS-Server.<domain>.home
<domain>.com 10.1.1.100 DNS to AD DNS AWS-Server.<domain>.home
There is a 2012 R2 server at 10.1.1.100 running DHCP, DNS, AD. Within DNS on that server it is set to only forward DNS queries to the pfSense firewall. pfSense then uses Unbound to query the root hint servers, etc. Are my domain overrides incorrect? I have to be doing something wrong but I'm not seeing it.
I've triple checked the DNS entries in the AD/DNS server. I've salvaged stale records. I've rebooted the server and the pfSense. I've stopped and restarted Unbound. I don't have any aliases defined in pfSense that would associate 10.1.1.31 to aws-09. I just cannot for the life of me find where unbound is getting the incorrect PTR record. Any ideas?
If I PING -a 10.1.1.31 from my Windows machine it correctly resolves to "AWS-09.<domain>.home" and vice versa. So the Windows side when it DNS queries the AD server is correct.
Is there a way to view the A and PTR records that unbound creates? I've tried flushing the cache by stopping and starting unbound but it still keeps 10.1.1.31.
You do understand creating a forward A record will auto create your PTR right? So if you have entry of Aaron-iphone.whatever.home, then doing a PTR for whatever IP the forward points to will return that forward.
You could prob set your zone type to
Like transparent, but ignores local data and resolves normally.
Vs the default transparent.
To answer your question on how to see all local data that unbound has..
unbound-control -c /var/unbound/unbound.conf list_local_data
Going to be long ;) So dump it to a file or have a long buffer.. You will see that any host overrides you created also created PTR records.. Same if your running dhcp on it and you have it register dhcp leases, etc.
… creating a forward A record will auto create your PTR right? So if you have entry of Aaron-iphone.whatever.home, then doing a PTR for whatever IP the forward points to will return that forward....
Yeah, I understand. I don't have any forwards defined for anything to the address of 10.1.1.31
Thx for answering the question about how to see the local data for unbound. I'll give it a shot.
Thx for your help.
OK, I think I'm on to something here. While reading files at /var/unbound I came across dhcpleases_entries.conf in it are the following lines:
local-data: "Aaron-iPhone.<domain>.home IN A 10.1.1.31" local-data-ptr: "10.1.1.31 Aaron-iPhone.<domain>.home"</domain></domain>
But in my GUI at pfSense : STATUS >> DHCP LEASES the above does not exist. Also at SERVICES >> DHCP SERVER (it's disabled), I have some pre-defined IPs that will be assigned if my DHCP server on my AD server should go down, but once again, the above IP (10.1.1.31) and host name are not defined.
So even though I'm not using the DHCP server on pfSense, unbound seems to still be reading the content of the dhcpleases_entries.conf file. Plus I DO NOT have the checkboxes enabled in SERVICES >> DNS RESOLVER for DHCP Registration and Static DHCP
I edited the the dhcpleases_entries.conf file to intentionally misspell "Aaron…" as "Aeron..." and also changed 10.1.1.31 to 10.1.1.33, stopped then restarted unbound, then did a DIAGNOSTIC >> DNS LOOKUP, plugged 10.1.1.33 into the field and it returned "Aeron...".
Is this how it's supposed to work? Doesn't seem right.
So you have a reservation for it..
Do you have an actual lease? Look in the leases file, or what does it show under leases?
I only have a reservation for it because the GUI doesn't match the config files. :P
Now that I know there is some weirdness going on I'll have to keep that in mind - not to trust the GUI. I can manually clear out the *.conf files to make them right.
Thank you for pointing me in the right direction.
"not to trust the GUI."
I wouldn't say that.. You at some point created a reservation for it would be my guess.