I'm running Pi-hole v5.2.2, Web Interface v5.2.2, FTL v5.3.4 on Raspberry Pi Zero W.
I have ISP provided router/modem. I have disabled the IPv4 DHCP server on the router and enabled it on the Pi-Hole. This works great for the IPv4 devices.
Unfortunately, the ISP router does not allow me to disable or even change anything regarding the DHCPv6 except for the autoconfiguration type. It can be stateful or stateless and it provides addresses starting with 2a02 (public as I understand).
In the Pi-Hole I have enabled the IPv6 support (SLAAC + RA), but all IPv6 devices are bypassing the Pi-Hole for the DNS.
There is no place to set the IPv6 DNS on the ISP routers DHCP.
Is there any way to force the IPv6 devices in my network to use the Pi-Hole?
I have a OpenWRT router, and gave up using pihole as DHCP (4 or 6) server. I setup OpenWRT's dnsmasq and odhcp as DHCP servers, and set pihole's dnsmasq to forward my LAN domain to it. All other queries are forwarded to OpenDNS, with a cloudflare proxy to use DoH.
On OpenWRT, we can set on /etc/config/dhcp the IP of DNS server, so devices learn from it to request pihole for DNS resolving. It was troubling because they kept using OpenWRT's IPv6 address, and I had to do some tweaks to solve it. Not providing a IPv6 address for DNS server doesn't work, because odhcp implies to use itself, I had to explicitly place my Server's IPv6 address so it'd work. Now it's 100% as I had tested.
If u're using a ISP modem as router, u're with no luck, as most of them remove features configs to avoid customers messing around and breaking anything, and then they having to provide support. More complex settings also require more trained staff.
If u don't wanna buy a router and set it, the only way I see is to disable IPv6 on every device on ur LAN, which isn't advised.
If your router supports it, you could either redirect or at least block outbound DNS port 53 traffic for all devices but Pi-hole (though chances are that wouldn't prevent DNS requests through your router's IPv6 address).
If your router doesn't support controlling DNS traffic, you'd have to manually configure a DNS IPv6 server address on each and every client in your network.
Not all clients may allow you to do so - most smartphones, tablets or IoT devices usually don't.
If you are not dependent on IPv6, you could also consider switching off IPv6 on your router completely - provided your router supports it.