Conditional forwarding works without explicit configuration in v5

Hi,

my network is 192.168.0.0/24, and my router is at 192.168.0.1 (fritz.box). The router is also the DHCP server for this network.

I have a Linux host (192.168.0.20) that uses 192.168.0.1 as its DNS resolver.

Details

cat /etc/resolv.conf

domain fritz.box
search fritz.box
nameserver 192.168.0.1

I noticed the following:

On that Linux host, when I spin up docker-pi-hole version 5 (e.g. 2024.07.0) and configure any device on the network to use Pi-hole as its DNS, I can see that the client IP is properly reverse-resolved. The device appears on the dashboard under 'Clients' e.g. as phone.fritz.box.
This works with Pi-hole's default settings out of the box.

With version 6, this stopped working. I can see only the IP address of the device, no hostname.

I am aware, that this can be easily fixed by configuring conditional forwarding: true,192.168.0.0/24,192.168.0.1,fritz.box

I’m just interested to know why and how reverse DNS worked in v5 without explicitly configuring conditional forwarding.

Thanks

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

This was already fixed.

Please follow the template including a debug Token.

EDIT:

Sorry I misunderstood your issue.

I thought you were trying to configure reverse servers without explicitly settings the hostname part ,fritz.box... using just true,192.168.5.0/24,192.168.5.2, that's why I said it was already fixed.

v5: https://tricorder.pi-hole.net/2EUB4rBx/
v6: https://tricorder.pi-hole.net/VDI27t8E/

A test DNS query was made from 192.168.5.10. In v5, this IP address resolves to workstation.fritz.box.

I'm not an expert in dnsmasq options, so I'm not sure what exactly it is causing the difference between the 2 servers and this is a guess.

Apparently there is one thing that could explain it:

Pi-hole v5 doesn't set domain and local options in /etc/pihole/dnsmasq.conf.

Pi-hole v6 sets them in /etc/pihole/dnsmasq.conf when no reverse servers are configured, using the dns.domain value (it defaults to "lan").

-rw-r--r-- 1 pihole pihole 5.1K Mar 18 00:26 /etc/pihole/dnsmasq.conf
   (...)
   domain=lan
   local=/lan/

This could explain why clients using .fritz.box hostnames are not returned in v6.

My suggestion is to set your router in conditional forwarding.

Sorry for the late reply. I've tried that, but it makes no difference. Also FTL doesn't know about my router, as long as I haven't configured conditional forwarding.

So my guess is, v5 uses the container DNS to do reverse lookups, while v6 doesn't use it.

Within the container dig -x 192.168.5.10 works fine and returns the correct hostname.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.