I found the bind-server-filter-aaaa
package in 21.02.2, but it took me quite some time to find the documentation needed to configure it. I don't see anything in the openwrt wiki, and eventually had to go find something in Ubuntu's reference pages.
So, I'll write up a wiki page for OpenWrt, about how to configure a named instance to filter out AAAA records, such as for services that don't allow access through IPv6 6in4 tunnels.
I'm guessing a good place for that would be a sibling article to https://openwrt.org/docs/guide-user/services/dns/bind ?
The necessary option FYI is this at the top-level of /etc/bind/named.conf
:
plugin query "/usr/lib/bind/filter-aaaa.so" {
filter-aaaa-on-v4 yes;
filter-aaaa-on-v6 yes;
};
Why do you want to disable IPv6? It's very bad practice! Maybe there's a better solution?
Certain network services prefer IPv6, but don't allow full access through IPv6-in-IPv4 tunnels (such as Hurricane Electric). The recommended way to force these services to use IPv4 only is to alter the DNS lookups so that their domains have no working IPv6 addresses. One way to do that is to force their DNS domain lookups to go through a filtering DNS relay that never returns AAAA records for the domains in question.
Ah yes, sure. I thought you wanted to disable it globally, not just for certain domains. Also Wikipedia blocks editing from Hurricane Electric. I did it by blocking the routes in the firewall but it's also not a clean solution especially with multi-hosting.