IP addresses in dashboard instead of client names

Hello,

I have Pi-hole installed pretty standard, except for using Apache webserver instead of lighthttpd.

My issue is that Pi-Hole is my DHCP server, and under the DHCP section i can see my leases correctly, MAC | IP | Hostname.

However, in the dashboard, only the IP's of the clients are shown, the only ones with names are ones i have created manual CNAMEs in Pi-Hole for.

From what i have read, Pi-Hole being the DHCP server, and showing the correct names in the dhcp.leases file, it should be correlating it for the dashboard.

[user@Server pihole]# cat dhcp.leases | grep Apple
1628094726 50:32:37:b7:9f:xx 192.168.100.66 DarkApple 01:50:32:37:b7:9f:xx
1628094757 cc:d2:81:7d:5a:xx 192.168.100.150 DarkApple4K 01:cc:d2:81:7d:5a:xx

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

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/mCzdzOiJ/

I'm not using the pi-hole for DHCP server - but I did have a similar issue with numbers appearing for many devices.

I used this work around: modified /etc/pihole/pihole-FTL.conf to have REFRESH_HOSTNAMES=ALL .

This causes the pi-hole to refresh hostnames once an hour, and all of my devices now get names - not numbers.

I have updated that setting and still no dice 2 hours after a restart.

It seems you've enabled Pi-hole's Conditional Forwarding for your 192.168.1.0/24 network, so you've instructed Pi-hole to query your router at 192.168.1.252 to retrieve hostnames for IP adresses from that subnet:

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1506 Aug  4 09:44 /etc/dnsmasq.d/01-pihole.conf
   rev-server=192.168.1.0/24,192.168.1.252

Since you've configured Pi-hole to handle DHCP now, your router wouldn't know those names anymore.

Disabling CF should fix your issue.
EDIT: Obviously not, since that CF is for a site-to-site VPN.

So, the reason that is configured is my network is 192.168.100.0/24. Gateway 192.168.100.1, PiHole is on 192.168.100.6.

My gateway is a firewall, which does a site to site VPN to my friends house, his network is 192.168.1.0/24, and his PiHole is 192.168.1.252.

I setup the conditional forwarders because i wanted to resolve hostnames for two domains from his DNS server so i could access his local resources directly by name.

I assumed this setting was the traditional DNS conditional forwarding, not to do with DHCP.

Have i configured that incorrectly, or is this an awkward situation where the setting does both?

Neither - nor, I'd say.
The VPN situation wasn't apparent from your original description, and I was lenient not to check your complete network information after spotting your CF.

You can discard my previous advice.

Can you verify if Pi-hole would know any names for the IPs in question, e.g.:

nslookup 192.168.100.53 192.168.100.6

Looks like DNS is working, just not the display.

Server: darkvirus.nz
Address: 192.168.100.6

Name: iPhone.dv.local
Address: 192.168.100.53

Could you provide a new debug token, please?

Your previous one has expired.

https://tricorder.pi-hole.net/FEbRdGJ3/

Apart from the absence of lighttpd, there is nothing in your debug log that jumps out at me immediately.

The one thing that strikes me as odd is that your Pi-hole's IP address is associated with a FQDN that doesn't match your local domain.

From your debug log, it would seem your Pi-hole is associated with pi.hole and darkserver as hostnames, or pi.hole.dv.local and darkserver.dv.local with your local domain appended.

Where is darkvirus.nz sourced from?

That is my external domain, i host a couple of web services on the same apache server (currently external access disabled), and i made my internal DNS authoritive for the domain so when on LAN i would go to the internal address. So technically it is the name of that server.

But where is that name sourced from?
Did you e.g. define a local DNS record for that, or is there another DNS server in your network?

What's the output of

dig -x 192.168.100.6 @192.168.100.6

Its defined in /etc/hosts

cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.100.6   darkvirus.nz pihole.darkvirus.nz DarkServer darkserver.darkvirus.nz
dig 192.168.100.6

; <<>> DiG 9.11.25-RedHat-9.11.25-2.fc33 <<>> 192.168.100.6 
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39588
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;192.168.100.6.                 IN      A

;; AUTHORITY SECTION:
.                       10800   IN      SOA     a.root-servers.net. nstld.verisi                                                                                                                                                                                                                                             gn-grs.com. 2021080700 1800 900 604800 86400

;; Query time: 29 msec
;; SERVER: 192.168.100.6#53(192.168.100.6)
;; WHEN: Sat Aug 07 20:04:25 NZST 2021
;; MSG SIZE  rcvd: 117

Ok, so you expect that name, and also, it is your Pi-hole that is providing that name.

Could you repeat both of the reverse lookups and find the corresponding log entries in /var/log/pihole.log?

Since they are sourced locally, I'd expect to see entries like config <ip> is <domain>.

Aug  8 11:08:12 dnsmasq[186820]: query[PTR] 6.100.168.192.in-addr.arpa from 192.168.100.6
Aug  8 11:08:12 dnsmasq[186820]: /etc/hosts 192.168.100.6 is darkvirus.nz

That's looking good.

What about the other ones - those nslookups for the IPs that don't resolve?

From what i can see, the information is there and working, its purely not connecting the dots in the console.

dig -x 192.168.100.53 @ 192.168.100.6

Aug 9 08:31:18 dnsmasq[186820]: query[PTR] 53.100.168.192.in-addr.arpa from 192.168.100.6
Aug 9 08:31:18 dnsmasq[186820]: DHCP 192.168.100.53 is iPhone.dv.local

Indeed, that's looking good as well.

Thank you for providing those details. Based on those logs of yours, we can rule out that Pi-hole's DNS portion would try to retrieve names from a different source or would have other difficulties to retrieve names.

As far as I recall, there were also no config settings in your debug log that would instruct your web UI not to translate IPs into names - but alas, those debug logs only last 48h hours.

In addition to a new debug token, we could also check your dnsmasq configuration for stray custom files:

grep -nRv '^#\|^$' /etc/dnsmasq.*