Long version
My problem started with me trying to pull the docker image for plex one of my Pi's.
pi@dazzler:~/apps/plex $ docker-compose pull
Pulling plex ... error
ERROR: for plex b'Get https://registry-1.docker.io/v2/: x509: certificate is valid for *.env.meliopayments.com, not registry-1.docker.io'
ERROR: Get https://registry-1.docker.io/v2/: x509: certificate is valid for *.env.meliopayments.com, not registry-1.docker.io
Uhh, was docker hijacked?
So tried curl https://registry-1.docker.io and yes, invalid cert. Then I tried on another Pi. Same thing. Tried it on my mobile (wifi off), and it works properly. So the problem is in my network.
First, disable IPv6 on the Pi-hole to get rid of a hard to diagnose variable. I say this because you are forwarding to an IPv6 address that is not in your upstream configuration:
server=1.1.1.1
server=1.0.0.1
Jan 25 00:00:03 dnsmasq[2238]: forwarded configuration.apple.com to 2606:4700:4700::1111
Jan 25 00:00:03 dnsmasq[2238]: query[AAAA] configuration.apple.com from 192.168.18.5
Jan 25 00:00:03 dnsmasq[2238]: forwarded configuration.apple.com to 2606:4700:4700::1111
Jan 25 00:00:03 dnsmasq[2238]: query[A] configuration.apple.com from 192.168.18.5
Jan 25 00:00:03 dnsmasq[2238]: forwarded configuration.apple.com to 2606:4700:4700::1111
*** [ DIAGNOSING ]: Name resolution (IPv6) using a random blocked domain and a known ad-serving domain
[✓] millennialmedia.com is :: via localhost (::1)
[✓] millennialmedia.com is :: via Pi-hole (<<PUBLIC IPV6 ADDRESS REDACTED)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (2001:4860:4860::8888)
Second, when you re-enable IPv6, don't use GUA (public) IP addresses.
Jan 25 00:06:56 dnsmasq[5772]: query[A] registry-1.docker.io from 192.168.18.9
Jan 25 00:06:56 dnsmasq[5772]: /etc/hosts registry-1.docker.io is 52.4.20.24
Frak! Of course, first obvious thing I did not check. I removed the ip from the hosts file and this looks solved now.
Just wondering now how it got there.