Pihole not resolving local hostnames

Expected Behaviour:

PiHole to resolve Lan hostnames on dashboard. (PiHole is the DHCP server for the network)

Actual Behaviour:

Ip addresses are being shown.

Debug Token:

rkb8rglrqt

You would have to edit your /etc/hosts and specify the hostnames for the IPs.

That will start showing their names instead of IPs in the reporting.

I'm using Pihole as the DHCP server, I shouldn't need to do that.

It should resolve (and display) whatever the clients are broadcasting.

How do your clients show up under Settings/DNS and DHCP leases ?

MAC address IP and Unknown ?

Appreciate your help.

The hostnames show up correctly under settings/dhcp

Is this a recent behavior or it's been like this since day 1 ?

I'm asking because on my side, my devices that join the network and are not defined in /etc/hosts, do show up in my Query Log and Top Clients with the hostname...

This is a pretty recent development actually, everything was working just fine a few days ago.

Do you see hostnames in the DHCP settings?

Hostnames do appear there, yes.

Sorry, I didn't notice your earlier comment mentioning that. What server is in /etc/resolv.conf?

Here's the contents of resolv.conf:

search local
nameserver 1.1.1.1
nameserver 1.0.0.1

Because Pi-hole is not using itself for DNS resolution, it is not able to look up local hostnames. Change the servers it is using to only localhost (127.0.0.1) and restart FTL: sudo service pihole-FTL restart

Looks like centos's network manager overwrites resolv.conf, so I just had to set the nameserver through that.

Thanks a lot, I couldn't have fixed it without your help.

1 Like

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