Double entries (A and AAA) in query log

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:
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] from
15:22:07 dnsmasq[66215]: query[A] from

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!

You have not misconfigured anything.

Ok. Great thank you!

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

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 or ::1#5353. Is that right?

dig +short @ -p 5353

dig +short @::1 -p 5353

Both commands give me the same output:

$ dig +short @ -p 5353

$ dig +short @::1 -p 5353

Did that answer the question ?

That’s what I am not sure because a:

*Non-authoritative answer:*
*Address: 2604:a880:400:d0::1071:1*

tells me that has a IPv4 and a IPv6 address.

Hence if I do a name resolution via ::1 I"d expect the IPv6 address will be returned and not the IPv4. So that’s why I am a bit confused.

dig +short @ -p 5353 a

dig +short @ -p 5353 aaaa

dig +short @::1 -p 5353 a

dig +short @::1 -p 5353 aaaa

Okay got it. Thank you very much for your time to explain this to me.

1 Like

IPv6 DNS queries can be answered by IPv4.

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.

Thanks you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.