Problem
I'm running Pi-Hole on a Raspberry Pi Zero W 2. I have several A and C DNS records mapped to different services on a separate machine in the network.
I have enabled the DHCP Server in the settings and I have disabled the DHCP server running on my router. I'm now trying to connect to my local instances through local domains like service.home.local
from within my home network, which however does not resolve to the actual IP. Looking at the windows configuration and the output of nslookup:
Default Server: fritz.box
Address: <some ipv6 address>
it seems like the primary DNS server is still set to my router. In the windows network configuration, the ip of my raspberry pi running the PiHole and thus the DHCP server is listed as the only IPv4 DNS Server, while the first ipv6 address listed in the IPV6 DNS Server section is the same as in the output of nslookup. Is there any reason why the IPv6 entries are preferred here? Regarding the second IPv6 DNS Server IP address, I cannot tell which device it corresponds to nor where it comes from.
This problem is not only present on my Windows machine, but also on my Android phone and other linux machines in the same network (i.e. every other device). At this point I'm just running in a circle trying to figure out the issue. When connecting to my network using a WireGuard tunnel, everything works as expected since I set the DNS in my WireGuard config to use the ip of the pihole.
I'd be happy to provide more information as needed.
Expected Behaviour:
I would expect the PiHole DHCP Server to distribute the correct DNS server (which ironically it does, but apparently not as the primary one?).
Actual Behaviour:
The ip of the pihole is not distributed as the primary DNS server, which is still set to the ip of my router.
ping
-ing or curl
-ing the A record (home.local) or C records (x.home.local which just forwards to home.local) do not resolve. Running dig @192.168.178.105 home.local
answers with the correct IP, but when omitting the @105.168.178.105 (which is the IP of the host running pihole), dig is not able to resolve the IP since it's using some other server.