Router internet access after Adguard DNS

I've followed the wiki guide to installing Adguard DNS. Everything with it seems to be working fine but the one problem I am having is accessing the internet from the router itself. I guess because the DNS port locally is changed to :54 I can no long long update or ven nslookup a site.
The only way I can get it to work is running a command like nslookup google.com 127.0.0.1:53.
I've tried changing the DNS setting on different interfaces without any luck.
Does someone have some insight into what I'm missing or how to fix?

use the wandns script to set your router upstream dns. It currently uses cloud flare dns but you can change the values to any dns u prefer.

That will keep your router upstream dns separate from AGH. It does mean your router won't use the AGH filtering but honestly should not be needed as you are only updating/checking rather than surfing from the router.

#!/bin/sh
# Reconfigure router DNS provider to cloudflare upstream

# Disable peer ISP DNS
uci set network.wan.peerdns="0"
uci set network.wan6.peerdns="0"

# Reconfigure router IPv4 DNS provider to cloudflare upstream
uci -q delete network.wan.dns
uci add_list network.wan.dns="1.1.1.1"
uci add_list network.wan.dns="1.0.0.1"
 
# Reconfigure router IPv6 DNS provider to cloudflare upstream
uci -q delete network.wan6.dns
uci add_list network.wan6.dns="2606:4700:4700::1111"
uci add_list network.wan6.dns="2606:4700:4700::1001"
 
# Save changes
uci commit network

# Restart network service to reflect changes
/etc/init.d/network restart

Other DNS providers

What’s in /etc/resolv.conf at this point in time?

This is what I have done already, although through luci app.

It was only nameserver 127.0.0.1 so I added nameserver 9.9.9.9 and now it works. Does this not work the same when you change the DNS settings on the WAN as mercygroundabyss suggested above?

sounds like you ran into this bug

uci set dhcp.@dnsmasq[0].localuse="1"

What a confusing thread that is. I'm very unclear what the right settings are supposed to be in the end :frowning:

1 Like