Pihole DHCP appears to provide a random DNS IP address for clients

On any router I've owned in the past DHCP and DNS has been like salt and pepper, however on Pihole the DHCP settings does not seem to offer any way of letting DHCP clients know which IP they should use for DNS. I assumed, given its what Pihole does, that it automatically offers itself, and therefor there are not options to set a dns server under DHCP settings, but actually what happens is clients appear to be handed a random IP address for DNS.

I've wasted hours now trying to get this to work through dnsmasq files but it just doesnt work. I also see some saying that you should set that up in your router, but as I started out writing, when I disable DHCP in my router I automatically also disable the option of setting a DNS IP address for clients.

Obvious upstream ip addresses can be set, but that's for pihole, not for the clients.

If there is a proper way to get this to work would it be very hard to write a brief howto?

You can see what DNS server(s) is/are advertised on your LAN via DHCP and from whom with below:

pihole-FTL dhcp-discover

But thats only the IPv4 part.
If have IPv6 enabled on your router for your LAN, your router may also advertise another DNS server IP(s) that is/are not Pi-holed (in most instances, the router IPv6 IP itself).
Best to post the token only that was requested in the template so the mods can have a look at IP's etc:

Debug Token:

[Replace this text with the debug token provided from running pihole -d (or running the debug script through the web interface]

1 Like

This would be unusual. Examples please, with screen shots, references to logs, etc.

Also, please follow our help template and provide a debug token.

1 Like

I'm running pihole in a docker container on my NAS. Can I just exec into the container to run pihole-FTL or is there a recommended docker-way to do it?

Actually I don't know if it's even worth pursuing the issue. I have a perfectly fine working DHCP server on my router. The objective was to have reverse DNS working in my LAN. In pihole > settings > dns I've ticked "use conditional forwarding",

  • Local network in [CIDR notation] 192.168.10.0/24
  • IP address of your DHCP server (router) 192.168.10.1
  • Local domain name (optional) (my local domain name)
    Still, no local IP addresses seem to get resolved back to hostnames, in pihole or querying pihole (dig (at)192.168.10.10 -x 192.168.10.54 +short) - so I guess this doesn't work anyway so no point in pursuing the issue?

PS, seems that leaving the (at) sign for the dig command throws an error in your forum software "new users are not able to mention other users" or something like that.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Since it didn't work I had to go back to the Router DHCP server in order to have functional internet, so I dont have it running anymore and can't provide the debug log. As the procedure to test it is very complicated, it would require me to again enable DHCP in pihole, disable it in my router, setup my PC to use a static IP as the DHCP doesn't work, run the debug log script. It seems pointless if it isn't going to solve my use case requirement anyway.

I can neither confirm nor reject that assumption, since you haven't made any of the information available to us that we would have needed in order to assess your configuration and provide assistance (though we did ask for it for repeatedly).

The solution is to format your output as Preformatted text (this is the </-> icon in the format box at the top of the reply window).

dig pi-hole.net @127.0.0.1

becomes

dig pi-hole.net @127.0.0.1

This will also strip links from URL's and align text for easier reading.

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