I have setup pi-hole and unbound on a Debian VM and configured according to the guide available on the pi-hole website. Everything is running fine but I am curious about the double entries in the log.
I have setup two customer DNS for IPv4 and IPv6 for unbound forward:
Custom DNS 1: 127.0.0.1#5353
Custom DNS 3: ::1#5353
For nearly every query I get an A and an AAA entry in the log, e.g.:
15:22:07 dnsmasq[66215]: query[AAAA] fonts.gstatic.com from 192.168.1.23
15:22:07 dnsmasq[66215]: query[A] fonts.gstatic.com from 192.168.1.23
So from this it looks like for every request is send to the IPv4 and IPv6 DNS servers.
This is probably expected behaviour as you can't tell from the hostname.
Just wanted to make sure I don't have misconfigured something. Thanks!
Am I right in the assumption that the second DNS entry for ::1#5353 is actually not needed? It seems the local unbound server resolves IPv6 addresses anyway even if the request is send to 127.0.0.1#5353.
Also it looks it looks like the custom DNS are following the same rules as the normal DNS (keep the same server until failure or timeout) anyway so it's irrelevant if the DNS query to unbound comes through 127.0.0.1#5353 or ::1#5353. Is that right?
Yep. What misled me is that when use the large DNS resolver like Cloudflare they have a different servers addresses for IPv4 and IPv6. Of course they probably have different dedicated server (clusters) which are configured to only do either IPv4 or IPv6. For my little home setup it's just one and the same unbound doing both hence it doesn't matter how you reach it. A little mental hurdle I had to get over to understand.