I hate to ask this question because it’s so similar to others but they don’t seem to match my problem.
I upgraded from v5 to v6 a while ago and some local DNS entries now don’t work properly intermittently. I’m guessing because they’re returning IPv6 addresses which are sometimes used (although I don’t know a lot about IPv6). It had been working on v5 for ages.
My setup has a Cloudflare tunnel pointing ha.example.co to NGNIX Proxy Manager, which then sends it to 192.168.0.174:8123. This works fine externally. Internally I have a local DNS for ha.example.co also pointing to NGINX Proxy Manager. As shown below, IPv6 addresses are being returned despite (I think) IPv6 being disabled.
$ nslookup ha.example.co pihole-2.example.co
Server: pihole-2.example.co
Address: 192.168.0.62#53
Name: ha.example.co
Address: 192.168.0.198
Name: ha.example.co
Address: 2606:4700:3031::1234:567
Name: ha.example.co
Address: 2606:4700:3037::1234:5678
$ dig AAAA ha.example.co @pihole-2.example.co
; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> AAAA ha.example.co @pihole-2.example.co
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24998
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; EDE: 3 (Stale Answer)
;; QUESTION SECTION:
;ha.example.co. IN AAAA
;; ANSWER SECTION:
ha.example.co. 0 IN AAAA 2606:4700:3031::1234:456
ha.example.co. 0 IN AAAA 2606:4700:3037::1234:5678
;; Query time: 0 msec
;; SERVER: 192.168.0.62#53(pihole-2.example.co) (UDP)
;; WHEN: Sun Oct 05 04:23:15 UTC 2025
;; MSG SIZE rcvd: 103
Given that ha.example.co has a local DNS, when I restart the resolver, why is Pihole sending it to 8.8.8.8?
[resolver]
# Should FTL try to resolve IPv4 addresses to hostnames?
resolveIPv4 = true
# Should FTL try to resolve IPv6 addresses to hostnames?
resolveIPv6 = false ### CHANGED, default = true
If it’s relevant, I also have two Pihole instances, where the config is mirrored (except DHCP active) using Nebula-sync. Pihole-2 is the master and has DHCP enabled, whereas Pihole-1 does not. The docker config is below. For a while I tried running on the main OS (Ubuntu VM) but that was also returning IPv6 addresses.
sudo docker run -it \
--restart=always \
--network=pihole-macvlan \
--mac-address=0a:bb:bb:bb:bb:02 \
--ip=192.168.0.62 \
-p 53:53/tcp \
-p 53:53/udp \
-p 67:67/udp \
-p 80:80/tcp \
-p 443:443 \
--cap-add NET_ADMIN \
--cap-add CAP_CHOWN \
--cap-add CAP_NET_BIND_SERVICE \
-e TZ="Australia/Melbourne" \
-e WEBPASSWORD=mypassword \
-e DISABLE_IPV6=true \
-v /etc/localtime:/etc/localtime \
-v /data/docker/pihole/data:/etc/pihole \
-v /data/docker/pihole/data/dnsmasq.d:/etc/dnsmasq.d \
--name pihole-2 \
--label 'wud.tag.include=^\d+\.\d+\.\d+$' \
-h pihole-2 \
pihole/pihole:2025.08.0
Within /etc/dnsmasq.d I only have the config for DHCP to return the two Pihole servers for DNS.
Every few days I google the problem again on the assumption that it should be a simple problem, but I’m struggling.
