[Dnsmasq-discuss] IPv6 address looked up despite of IPv4-address directive

Andreas Kuropka andreas at kuropka.eu
Tue Sep 21 13:42:25 UTC 2021


Hey there,

I've set up dnsmasq to relay queries to another DNS server but made exceptions with the address directive to route them through the local network to a webserver. Based on the source ip (local or web) the web server behaves differently. The webserver and local network are connected by a VPN-tunnel.

address=/domain.tld/192.168.188.10

If the domain.tld (or sub.domain.tld) is queried only the IPv4-address should be returned.

This always worked flawlessly but now I discovered by chance that the A-Record is returned as intended but in addition an AAAA Resource Record is returned as well by relaying the query to the DNS server. As a result of this not the local (IPv4-)route is used but the external (IPv6) one.

I use dnsmasq version 2.86. 

I implemented a workaround by setting another directive address=/domain.tld/:: which is rather dirty. So far I am wondering how can I disable IPv6-queries for certain domains or ensure only the IPv4-address is returned for those domains given.

Thank you!

Regards,

Andreas



More information about the Dnsmasq-discuss mailing list