Pi-hole local DNS without disabling IPV6 from devices on the network?

Hello. I've set up Pi-Hole on a Raspberry Pi Zero 2 W and its working great. I use it as DHCP and Local DNS. Everything is working great except if a device in my network ex. Windows 11/10 has IPV6 activated in their network settings. If IPV6 is disabled on the device all of the local domains get resolved without issue. Is there a way to fix this without disabling IPV6 from all of the devices?
When I run ipconfig in CMD on a device my custom Pi-hole DNS is always pushed down and 2 IPV6 DNS appear on top. This completely bypasses my set up. Breaks all of the local domain name resolutions and skips my upstream OpenDNS Family Shield DNS. Any help is greatly appreciated!

It sounds like you have to configure your IPv6, as you noted your DHCP is working fine and you are using PiHole in all your IPv4 queries but your IPv6 ones are using whatever default your router has.

I had to do this not long ago, I used the comment @Bucking_Horn gave in this thread:

In my case I ended up having to assign a static IPv6 address to my pi using it's link-local ( the one starting with fe80 ) and then in my router settings point the IPv6 DNS to the new static IPv6.

What I ended up doing was:

  • SSH into it and run either ip addr or ip -6 address show
  • Identify the local one that starts with fe80
  • Set the PI's static IPv6 in /etc/dhcpcd.conf then reboot
  • Set the upstream DNS in the PiHole admin portal to use IPv6 variants as well
  • Confirm this is working by turning off IPv4 on my local machine and only using IPv6, verify the queries show up in the admin portal ( don't forget to turn it back on once you're done )
  • Once you can confirm it's all working correctly you can log into your router and point it to your pi

Do look over the thread before doing any of these things, my router didn't provide some of the better ways of doing it so your mileage may vary.

2 Likes

Thanks!
I managed to set the static IPV6 IP and now if I set manually IPV6 default primary DNS on the Windows the local domains are working! I still didn't figure out the upstream pihole ipv6 variants. I tried putting the fe80 there but doesn't seem to work but if I put the fe80 in the Windows network ipv6 primary DNS then its working.

No problem
Sorry for the confusion on the upstream variants, by upstream I meant these checkboxes ( make sure the IPv6 ones are ticked )

Also keep in mind that if you plan on running the PiHole network wide, you will have to configure your router to use your Pis fe80 as the IPv6 DNS else the other devices will have the same problem

1 Like

I set the IPV6 OpenDNS Family Shield addresses already there in the custom 3 and 4 fields. My main router from the ISP unfortunately doesn't allow me to configure IPV6 settings and I can't change it because the cable is fiber optic directly but I think I can find a workaround by connecting another router that has IPV6 control with LAN to WAN connection with a different subnet and have all of the devices connect to that network and I can just set there the Default IPV6 DNS just like you said. Thanks a lot!

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