DNS Order confusion

Folks,

Installed and running pi-hole. Entered my pi-hole IP address into my router settings as first DNS address and my IP DNS server address as number 2.

Pi-hole has Google's 8.8.8.8 as upstream server.

Noticed some computers were not showing up on pi-hole query log.

Realised then that most computers had their own DNS settings so changed them to show pi-hole address as first DNS server.

Now confused; should my individual computers show my ROUTER address for DNS server or the Pi-hole address and should a second DNS address be shown?

Geffers

If you set pihole ip as DNS server in router, then you can just connect to it and it will work. However if you enter ROUTER ip address as DNS in your device (let's say your mobile) it will fail to resolve.

So, I have to use the actual local IP address of the pi-hole device.

Is there any point then putting a second DNS address in my computers if I have the router set up?

geffers

Set pihole IP address as router's DNS. That's it. Secondary DNS is same as the primary

Some routers put themselves as the DNS server and then internally forward to the DNS servers. Clients often disregard the primary vs secondary distinction, using both. If your router is not setting the DNS servers as you would like, or requires you to set more than just the Pi-hole as a DNS server, try disabling DHCP on the router and enabling it on the Pi-hole via the web interface settings.

1 Like

Thanks Mcat,

May give that a try. Progressing slowly with settings :slight_smile:

Geffers

Pi-hole should be your only DNS server since it sets additional upstream servers for you.

In addition to what @Mcat12 said, if you set Pi-hole and another DNS server in your router, clients may use on or the other so ad blocking may be hit or miss as a result.

Also see this FAQ:

Under the FAQs it suggests setting Pi-hole in the router will get every computer connected to the network using Pi-hole.

That did not happen on my network, two Kodi set-ups needed adjusting as the network settings had their own DNS settings, as did my Linux laptop.

Geffers

Did you wait until their DHCP licenses were renewed, so that they'd check for the setting? Your router probably wasn't sending out the DNS addresses via DHCP that you were expecting.

The FAQ is assuming devices are set to DHCP:

"If you set this configuration via your router's DHCP options"

The FAQ also mentions a section for how to setup when not using DHCP like you do for laptop and Kodi's:

"Manual Method"

And as @Mcat12 mentioned, when you change DHCP settings, these settings need to propagate to the clients first.
This happens when the DHCP lease expires on the client (Pi-Hole's DHCP default is 24 hours);
or release/renew the DHCP lease manually on the client;
or bring down and up, the network interface;
or reboot.

Good point. I updated the FAQ to include info about renewing the DHCP leases for ad blocking to take effect.

Might have been on my two Kodi devices I have a fixed IP so set the Name Severs too.

Geffers