3

Can I configure dnsmasq to respond to either ipv4(A) or ipv6(AAAA) queries only?

I am using dnsmasq to forward queries from an internal subnet to a WAN connection. Unfortunately, sometimes I will only have an ipv6 connection on the WAN interface, but a client will send both A and AAAA queries and then choose to use the ipv4 address from the responses. The reverse can also happen at any time.

I should mention that I don't use dnsmasq for dhcp, so changing the internal subnet to ipv6 is not really an option.

I've looked through the dnsmasq configuration options, but nothing seems to fit my requirements. I suppose I can filter the requests or the responses with the firewall, but I'm afraid that would trigger a lot of retries.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
E. Ionescu
  • 31
  • 1
  • There are some unofficial patches. But you would have to compile dnsmasq yourself. – TJJ Jun 05 '21 at 17:57

1 Answers1

1

version 2.87:

Add --filter-A and --filter-AAAA options, to remove IPv4 or IPv6 addresses from DNS answers.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
js1
  • 11
  • 2