Now seeing NXDOMAIN when looking up pi.hole by IP address

In the current pi.hole software, a reverse lookup of the IP of the pi.hole returns the name of the server:

nslookup 192.168.169.6
6.169.168.192.in-addr.arpa name = raspberrypi.lan.

But the beta shows:

nslookup 192.168.169.6
** server can't find 6.169.168.192.in-addr.arpa: NXDOMAIN

Is this expected?

Thanks for your report. I'll post an update here once we get the chance to investigate further and can work on a fix.

A post was split to a new topic: Unable to access admin UI on Ubuntu 21.04

Please try if

pihole checkout ftl fix/pihole_ptr

resolves the issue for you.

--

This is actually a tricky situation. What we did before v5.9 was replying with pi.hole only for the address defined in setupVars.conf (which may have been wrong).
The new behavior is to reply with pi.hole for every address for which a local interface exists which runs inline with our new behavior to reply with the address of the most suitable interface when querying pi.hole for a A or AAAA records.

This new behavior can be influenced by the users in a two ways:

  1. Config option PIHOLE_PTR defaulting to true
    When you set this option to false, Pi-hole will not add any PTR requests itself.
  2. Already existing ptr-record entries in /etc/dnsmasq.d/ take precedence over our automatic PTR replies.

Two things remain to be discussed:

  1. Should we reply with pi.hole for 127.0.0.1 and ::1 with pi.hole as well or should there be an exception for these addresses ?

  2. We provide PTR requests for other interfaces, too. This may be seen as a slight inconsistency, because PTR 192.168.4.1 may give you pi.hole, however, A pi.hole would never give you 192.168.4.1 if this is not the interface you are connected to.

With the fix version of pihole, I'm now seeing pi.hole for the raspi's ethernet interface, but now every machine on my lan shows pi.hole as its loopback interface name! My guess would be that the loopback interface should have an exception and just display "localhost". Interestingly, if I do "nslookup localhost" I get 127.0.0.1 as expected.

This is interesting so this is sent to the Pi-hole regardless of that there is already a record in the client's local /etc/hosts (rendering an upstream query unnecessary)
Which tool did you use for checking, nslookup everywhere?

I tried nslookup on the pi-hole, on a separate Linux box, and Windows. I hadn't realized that a loopback address would be sent to the DNS server for resolution either.

My vote would be localhost, since that is common to all installs.

cat /etc/hosts
127.0.0.1	localhost
::1		localhost ip6-localhost ip6-loopback
ff02::1		ip6-allnodes
ff02::2		ip6-allrouters
...

I just pushed an update to fix/pihole_ptr that skips replying with pi.hole if the request is for the loopback address. The reply will now have to come from /etc/hosts

Does this now behave as expected?

I believe that this mole has been properly whacked. I'm getting the expected responses to the pi-hole address and loopback addresses now.

1 Like

Thanks for checking, we merged the change into the release branch. Please go back to the release branch to receive further updates:

pihole checkout ftl release/v5.9