i want to prevent the local DNS server on my OpenWRT router to announce IPv6 records when querying the hostname by which the router is reachable from the Internet.
root@openwrt:~# nslookup my.host.com Server: 127.0.0.1 Address: 127.0.0.1#53 Name: my.host.com Address 1: 188.8.131.52 (Public IPv4 Adress) Address 2: ::1
I want the AAAA record Address 2: ::1 to be gone.
Q: Why do i want this?
A: I have an instance of Wireguard running on my OpenWRT Router. I want clients in my LAN to connect to this Wireguard server over the internet (not directly via LAN). When clients in my local network resolve the FQDN my.host.com, Wireguard uses the IPv6 address ::1. As the Wireguard Server is not listening on ::1 the client will never be able to connect.
Do you have a working solution on how to configure dnsmasq or odhcpd in a way that only resolve IPv4 A-Records and not IPv6 AAAA records for my use case?