Last 2 local name resolution cases: pi-hole itself, and router?

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

Expected Behaviour:

Would like to be able to resolve both my pi-hole and my router by name

Actual Behaviour:

unknown host errors

Debug Token:

zk8c3io6h5

I tried adding the name of the router, maximillian, to /etc/hosts (with just the short name) but pinging either maximillian, or the pseudo-fqdn, yields an unknown host. I note that /etc/hosts has an entry for the pi-hole, but it only resolves to the 127.0.0.1 address, which might be fine for on-machine, but not off.

I thought that the pi-hole software read in /etc/hosts on startup to gather in other names. So if that's not it, what is the approved mechanism, and if it is that, what did I do wrong?

Thanks for any help!

have you tried ping maximillian.local ?

Are you using the Pi-Hole as a DHCP server also ?

If you edited the hosts file, you'd need to reboot the device in order for the changes to take effect.

Pi-Hole is setup as DHCP, and is handing out home.tastewar.com as the local domain. I've tried maximillian.local as well, though, with no success. Yes, the pi-hole has been rebooted numerous times since that edit. So, if that is the normal/supported mechanism, there must be something I've missed.

The query log shows those incoming queries, and an NXDOMAIN result.

I believe .local domains are served by avahi

pi@pihole:/etc/pihole $ ps -efH | grep avahi
avahi 222 1 0 15:52 ? 00:00:00 avahi-daemon: running [pihole.local]
avahi 233 222 0 15:52 ? 00:00:00 avahi-daemon: chroot helper
pi 18408 638 0 17:38 pts/0 00:00:00 grep --color=auto avahi

and its also running on my linux boxes thusly

jimc@Inspiron-546:~$ ps -efH |grep avahi
avahi 781 1 0 10:52 ? 00:00:00 avahi-daemon: running [Inspiron-546.local]
avahi 817 781 0 10:52 ? 00:00:00 avahi-daemon: chroot helper
jimc 4244 4235 0 17:42 pts/1 00:00:00 grep --color=auto avahi

that said, i wonder what different output here suggests about the source

jimc@Inspiron-546:~$ avahi-resolve-host-name hostname.local
Inspiron-546.local fe80::a3c6:6da8:2107:f730
jimc@Inspiron-546:~$ avahi-resolve-host-name pihole.local
pihole.local 10.1.1.250

I can replicate the same behavior on my network.

The only difference is that some resolve, some don't ...

So, as part of getting local name resolution working in general, avahi was disabled to avoid any possible confusion. And local name resolution is generally working. It's just these last two cases, where the servers in question have static configurations and don't communicate with DHCP.

I have gotten the router's name to resolve by fixing my /etc/hosts entry. It had been:

10.10.10.1 maximillian

But I made it:

10.10.10.1 maximillian.home.tastewar.com maximillian

And now it's resolvable.

I'm just a bit confused now about how to do this for my pi-hole. The entry that was auto-created uses loopback and no fqdn:

127.0.1.1 pihole

So I would guess that I could replace that with:

10.10.10.186 pihole.home.tastewar.com pihole

But I'd be concerned about breaking anything that relies on the original entry. Any guidance on this one?? Unless I'm missing something, it seems that without a resolvable name, everyone using pihole must be typing its IP address into the address bar to get to the Web UI. Or manually edit the hosts file on all nodes in the network they might want to get to the pihole interface from, and that seems unlikely.

You can probably remove the 127.0.0.1 pihole entry. Also, the correct hostname entry should already be added in /etc/pihole/local.list

Interesting...

I have a local.list file in /etc/pihole, which I really don't believe I ever touched manually, and it has two entries:

10.10.10.186 pihole
10.10.10.186 pi.hole

From a Mac on my lan, I can ping pi.hole, but not pihole (unknown host).

So I'm left wondering where those came from and why one works and the other does not. Anyway, I removed the loopback entry for pihole, and added a good entry, and now it seems to work OK. Thanks for the help.

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