PiHole works on some devices

Expected Behaviour:

PiHole blocking Ads on all my devices.

Actual Behaviour:

I have Pi-Hole installed on Raspberry Pi Zero 2 W and nothing else on it, it is connected to a switch via Ethernet to USB adapter which then connects to the router.
In the router configuration page I have changed the DHCP DNS to the IP address of the PiHole and the DNS settings of the router.

Now, some of my devices actually (without any input from me, they're just connected to the WiFi or to router via Ethernet cable) use the PiHole, others do not, like my phone and my PC.

I have PiVPN installed on another Raspberry Pi and when I connect to it, the PiHole works.

I had the same problem when the Raspberry Pi was connected via WiFi, it would just work on some devices but not on other devices.

Debug Token:

https://tricorder.pi-hole.net/BWIXvGEC/

In the router configuration page I have changed the DHCP DNS to the IP address of the PiHole and the DNS settings of the router.

The current lease time is set to "Infinite" and some devices won't renew the DNS information:

     lease-time: Infinite

Did you manually renew the DHCP lease on every device after applying the changes?

No, I did not.

I have assigned static IPs through DHCP to some devices like the PiHole and the PiVPN, some cameras and another PC that runs some game servers. The rest of the devices get a 24 hour lease.

But then, there is this phone, some Xiaomi Redmi 9C I think that my mother uses, it worked with pihole from the moment that it was connected to the WiFi and my OnePlus 8, it did not work.
For about one week I have tried what people recommended on the internet (reddit and here) like manually set the DNS (Windows PC that I use), on Android - > Settings - > Disable private dns, disabled the adblocker to see if the pihole actually works on my device, switched from WiFi to Etherned over usb dongle.

What I didn't test is with a new router, I'm using some AX1500 from TP-Link which runs a slightly modified firmware by my ISP.

OK. This explains the "Infinite" lease time.

Another possibility is: some devices might be using IPv6 and bypassing the Pi-hole.

I did read about this so I went on to test it, on Windows when setting custom DNS from the new UI (Settings > Network and Internet > DNS) you have the option to set ipv4, ipv6 or both.

I set only ipv4, did the ipconfig /flushdns and renew and tested on new browsers that I don't use (so no add-ons) but it didn't work.

I have looked through the router settings and I can assign custom ipv6 dns so I took the ipv6 address of the pihole (ifconfig) and put it in the router settings but it doesn't seem to work.

I have made a network diagram of my setup, maybe there's a problem how everything is setup.

try removing the DNS settings of the router. On your Windows PC that is not working, what is the results of the ipconfig /all command

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe 2.5GbE Family Controller
Physical Address. . . . . . . . . : 24-4B-FE-90-A7-82
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2a02:2f00:9205:0:70fe:6f04:a7cc:6b3b(Preferred)
Temporary IPv6 Address. . . . . . : 2a02:2f00:9205:0:2c84:ec76:7bb1:ea58(Preferred)
Link-local IPv6 Address . . . . . : fe80::e23b:4b28:57d8:28c9%20(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.153(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, 3 August 2023 11:52:25
Lease Expires . . . . . . . . . . : Wednesday, 9 August 2023 12:25:58
Default Gateway . . . . . . . . . : fe80::6e5a:b0ff:fe55:85c%20
192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 103042046
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2B-B2-6C-EB-24-4B-FE-90-A7-82
DNS Servers . . . . . . . . . . . : 192.168.1.154 - this is the IP of the PiHole
NetBIOS over Tcpip. . . . . . . . : Enabled

Regarding the DNS settings in the router, I have changed them to the IP address of the PiHole, under Internet (where it connects via PPPoE) and DHCP server.
I have also updated the address under IPv6 to use the IPv6 address of the PiHole.

What I did notice is that the router sometimes tends to modify the DNS IP address to the ISP provided ones without modifying from "Use the Following DNS Addresses" to "Get Dynamically from ISP" option.
Might it have some hard-coded DNS servers inside it since it runs custom firmware from my ISP?

This is the best router that they provide, all of them run on a custom firmware and this model (the TP-Link) has the least limitations.



putting the same IP on the secondary DNS is not necessary. What's the results of the nslookup pi.hole command. I know you mentioned custom FW, but have you look at this guide How to use Pi-Hole DNS Server on TP-Link routers

I did take a look at their guide, but it does not provide some extra steps that I should take, modify there and that's all. Which I did.
As I said, some devices just work, they worked as soon as I put the DNS IP address of the PiHole into the router DHCP server. And some devices I just can't get to work with it, the devices that I actually use to browse the internet, that's the irony.

Just for the heck of it, can you disable IPv6 of the adapter on the Windows PC and see if it works

Disabled it, did ipconfig /flushdns, tested on Mozila, Opera, Chrome and the ads still go through.

Went to PiHole admin page and I can see queries from my Windows PC but nothing gets blocked, everything just passes.
Made me curious so I logged in with the PiVPN and that works as intended.

I'll test in an hour through WiFi (the Windows PC has WiFi) just to see if that way it works.

So I resolved my problem, now it works on all of my devices.

The solution: I bought the exact model of the router that runs the TP-Link firmware not a modified version of it and now everything works.

Thank you all for your help. :slight_smile:

Glad you found a solution. I've never use ISP router even when they offer to use for free.

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