I have been using Pihole for quite some time now and for its ad-blocking purposes its been working great. I wanted to set up local DNS forwarding on the Pihole so that my devices could reach each other by hostname. I followed this thread.
What I did first was in the Pihole’s host file at \etc\hosts I added the following entries:
- 192.168.1.1 router router.local
- 192.168.1.4 pihole pihole.local (PiHole server)
- 192.168.1.6 xxPC xxPC.local (main workstation)
- 192.168.1.9 rome rome.local (Windows AD Server)
- 192.168.1.10 troy troy.local (FreeNAS Fileserver)
Adding those entries allowed me to resolve the IP’s from the Hostnames on the PiHole only.
So I then as stated in the linked thread I went and added some entries to \etc\pihole\gravity.list:
- 192.168.1.1 router.local
- 192.168.1.4 pihole.local
- 192.168.1.6 xxPC.local
- 192.168.1.9 rome.local
- 192.168.1.10 troy.local
I then restarted dnsmasq with
sudo service dnsmasq restart and tried to resolve the IP on my main workstation. Couldn’t resolve host.
I know I can add the entries to each individual hosts files and they will all work perfectly, but that is not a good solution as every time I add a new server or device I would have to add a new entry to every device.
Does anyone see what I did wrong?
Thanks for any help