If I run
nslookup google.com GATEWAY, OpenWRT returns me the IPv6, which is useless for me (my ISP doesn't support IPv6) and this prevents some devices to access the internet.
I've already removed all IPv6 from my interfaces and also the ULA-Prefix, but the issue persists.
Is there any solution?
I've never seen the ping4 tool try an IPv6 address...
Can you show this?
It returns the IPv4 too (but just sometimes, often when it isn't the first DNS query), but the problem is that my WiFi-connected phones show the exclamation mark and the "No connection" (even if they can surf the web) which is very annoying.....
Sounds like a known issue for musl/getaddrinfo.
It prefers IPv6 addresses even when IPv6 connectivity is missing.
Unfortunately, I could not solve anything using the methods you proposed...
Collect the diagnostics and post it to pastebin.com redacting the private parts:
ubus call system board; uci show network; uci show firewall; uci show dhcp; \
ip address show; ip route show table all; ip rule show; iptables-save -c; \
head -v -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
Try this way:
uci -q delete network.loopback.ipv6
uci commit network
This behaviour for nslookup is correct. It's returning the routable address first.