Recently installed OpenWrt on a TD-8980.
Installed Wireguard and Vpn-Policy-Routing and everything works fine but i don't have internet connectivity in the router when Mullvad DNS is set in the Wan interface.
No ping, no opkg update, no DDNS update.
If i disable Mullvad DNS everything comes back to normal.
Tried to set up DNS in lan interface but same results.
I would love if someone can point me in the right direction to solve this issue/help me in troubleshooting this.
You've setup a chicken or egg situation... by setting the mullvad DNS for the WAN, it is not possible for the DNS to work unless the tunnel is up. The tunnel cannot be established because the specified dns server is not available to resolve the IP address to connect and bring up the tunnel.
Your WAN DNS should be something accessible all the time -- a public one like google, cloud flare, opendns, etc. would be a good option. You can then set the preferred DNS for your LAN(s) in the dnsmasq configuration.
Thanks for the quick reply.
To clarify things, i can access internet in devices that aren't using Mullvad tunnel.
It's only the router that can't access internet.
I'm a newbie here so i hope you can help me out.
So, if i understand correctly, i have to go to DHCP and DNS option in Network and set Mullvad DNS to Dns forwarding?
Is that it?
As long as your devices use your router as their DNS (if using DHCP, assuming no overrides, this will be the case), your router will resolve whatever it can (local stuff), and it will forward DNS to the upstream forwarder as needed for everything else.
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
cat /etc/config/network
cat /etc/config/dhcp
Also, please verify that the client devices (i.e. your phones, computers, etc.) are all using the router as the DNS server and not some override locally specified on the device.
Just an observation, i can access local domains in devices not using the tunnel,
but on the devices routed through the tunnel i can't access local domains.
Your dhcp file seems to be messed up... specifically, it appears that it is doubled up and the formatting might have gotten messed up (unless this was simply a mistake aas it was pasted into the forum).
see this section about half way thorough the file... can you check to see if this is what really exists inside the dhcp file?
I was just testing to prove that it would resolve test and test2.lan properly. This shows that you can include your local domain or just leave it as hostnames only, either way it works.
Dns is leaking from the devices routed through the wireguard tunnel (mullvad client), is the leaking to the openDNS servers that i added to WAN interface. But it states my country.