Pihole DNS doesnt work when applying it network wide via my router

My thopsis to my issue is that when i apply the DNS to my router of 192.168.1.11 it applies it to all of my network devicies including the pi making it so that when the pi wants to resolve the dns it trys to resolve from it self. i have tried changing the DNS to 1.1.1.1 / 1.0.0.1 maunally in the network perfences / interface / eth0 but it does not solve the issue.

the pihole works if i maunally route each device with a custom dns in their settings but if i ever try and change it to the pihole dns via my routers DNS page it does not work.

thank you inadvance.

Expected Behaviour:

DNS to be applied across network with any issue.

Actual Behaviour:

DNS is applied across network but when searching on multipul devices including PI broswers cannot resolve server.

Debug Token:

c22jmygq8d

The Pi-hole device does not get its settings from the router. It uses the DNS server located in /etc/resolv.conf. You have a different CIDR configured than what is present on your network interface (192.168.1.11/24 vs 192.168.1.11/10), and you are unable to resolve against 8.8.8.8.

Here are the applicable sections of your debug log that show what @Mcat12 described:

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
   192.168.1.11/10 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)
 
*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] sec.daten-ueberpruefungsservice.net is 0.0.0.0 via localhost (127.0.0.1)
[✓] sec.daten-ueberpruefungsservice.net is 0.0.0.0 via Pi-hole (192.168.1.11)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Setup variables
    BLOCKING_ENABLED=true
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=192.168.1.11/24

Thanks for the fast reply, how do i fix the this then ?

Run pihole -r to change the configured IP address. You may have outside networking issues which are unrelated to Pi-hole.

I have fixed the issue by just setting up my router using the pi-hole DHCP sever rather than the routers own one.

I cant maunally change the dns my router uses to apply the DNS to all devices but this way (The last comment) seems to work.

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