Conditional Forwarding is not working

Please follow the below template, it will help us to help you!

Expected Behaviour:

Hostnames are being displayed in Pi-Hole dashboard

Actual Behaviour:

IPs are being displated

Debug Token:

https://tricorder.pi-hole.net/27iv85badl!

More details

I'm using the Ubiquity ER-4 as DHCP, PiHole on RP3+ as DNS,
Router has one record of DNS, PiHole.

To solve it so the hostnames will be displayed I needed to update the /etc/hosts on the pihole machine, I would like to avoid that.

The conditional forwarding is set to use 192.168.1.1 as the resolver to convert IP addresses to FQDNs for your local domain. Does the DNS server at 192.168.1.1 have records mapping IP to FQDN for your clients?

I have just 1 DNS - pihole, in 192.168.1.1 I have the DHCP with IP reservation for all devices in the network

The way conditional forwarding works is to send queries for your local domain and pointer records to a DNS server that can answer the questions. Normally all queries go to your upstream selected resolver but upstreams on the Internet will not know about your local clients. So somewhere there needs to be a DNS server that can map your local IPs to DNS names. If the Pi-hole is the only DNS server on the local network the only way to map is via HOSTS files.

Maybe I'm missing something here,
Router DHCP configuration is that the DNS is the pihole,
DHCP holds all the IP reservations while pihole is the DNS when a request is getting out of the LAN (and internally), I can create a script that will add new records to dnsmasq.conf every time DHCP definition is being changed, I would like it to work without workaround, is there a way to do that (out of the box solution)?

thanks

If the router is set as the DHCP server then it should have the mapping of client to IP. The test would be to run dig @192.168.1.1 <hostname> from the Pi-hole device. That is what conditional forwarding would do, if the DHCP server / router does not answer then conditional forwarding will not work.

Another option is to use Pi-Hole as DHCP server. Then it will get client names directly from the clients.

; <<>> DiG 9.10.3-P4-Raspbian <<>> @192.168.1.1 bar-nas.barnet
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Seems that it's not working

I wrote a deep integration between the router to the home-assistant that I'm using including updating InfluxDB / Grafana, pretty sure it will not work the same, so if the trade off will be to maintain the hosts file, i prefer that...

It looks like the DHCP server is not exposing the IP to FQDN mapping so the only way will be to use a hosts file as the authoritative source of that information.

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