How to *not* use the pi-hole as its own DNS server?

On my home network, I have a Raspberry Pi Zero with Pi-hole running on it successfully. On the router, I set the primary DNS server to the IP address of the Pi-hole. For other machines on the network, this works great. They connect to the router, receive configuration by DHCP, and receive the router address 192.168.178.1 as their DNS server. The router receives DNS requests from the clients, and passes them on to the Pi-hole. This is all good.

However, on the machine running Pi-hole, things don't work as well. This machine also receives its configuration from the router by DHCP, but for some reason, it ignores the DNS configuration, and uses localhost (127.0.0.1) for all DNS queries. This is bad, because it makes it difficult to contact other local machines from the Pi-hole machine. Sometimes ssh machine.fritz.box works; other times ssh machine.local works; other times I have to do ssh 192.168.178.43.

My question: Can I set the Pi-hole machine to send all of its DNS requests to the router at 192.168.178.1, rather than sending them to localhost?

I know there are similar questions on the forum, but none seem to cover this exact question. I apologise if I have missed one that does.

Ben

Check your /etc/hosts to see if your pihole domains (machine.fritz.box and machine.local) are set to 127.0.0.1. Comment it out if so, restart pihole and it should announce the correct ip when queried for its own ip by hostname.

Not really.

Only because your router will then (based on it's settings) will query Pi-hole and Pi-hole the router which goes back to Pi-hole.

You'll have a loop and no DNS resolution.

What you could disable DHCP server on Fritzbox and let Pi-hole handle the DHCP server.

That way every single client will have it's onw entry in the logs and you won't have any configurations issues.

Or try the above post :slight_smile:

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