Adding a host name error

Expected Behaviour:

No error message

Actual Behavior

Debug Token:

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

I’m not clear on what you were trying to do. What were you trying to add and where? If you were trying to add information at the bottom of that screen using the “+” box, it won’t work because Pi-Hole is not your DHCP server.

So then how would I get pi-hole to show an host name for my clients list?

If you are seeing individual IP’s in the Pi-Hole logs (as opposed to all the client requests coming from your router IP), you can map IP’s to names in /etc/hosts on the Pi.

Another option is to enable the Pi-Hole DHCP server and disable the router DHCP server, then Pi-Hole will directly get the client names during the DHCP handshake.

For the first option, how would I do that?(Please give me some more details)

From the Pi Linux terminal

sudo nano /etc/hosts

Add lines at the end of the existing file in the format shown below (put your information there). Save, exit. Done.

192.168.0.111   Sense
192.168.0.112   MyQ
192.168.0.113   Iplug
192.168.0.114   Sonos5L

Thank you very much.

Another option that scales better (I think so):
Assumes using your router for DHCP (lets assume 192.168.1.1).
Create a custon dnsmasq config file in /etc/dnsmasq.d/ and name it something like 10-additional-dhcp.conf.
in 10-additional-dhcp.conf type the following:
server=/home/192.168.1.1
server=/1.168.192.in-addr.arpa/192.168.1.1
**this tells pihole dhcp router at 192.168.1.1 can resolve hosts for 192.168.1.0 subnet
**you can expand this for vlans as well.
Ensure your dhcp router is handing out pihole as your dns for clients. Ensure your router upstream dns is pointed to pihole.
Do not enable conditional forwarding in pihole settings.

Voila! should be good to go with hostname resolution in pihole web gui.

That’s already a feature with Conditional Forwarding, no need to manually create a new configuration file.

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