MT1300 WireGuard DNS routing problem

Greetings, running 3.215 on MT1300 Beryl, setup wireguard profile to connect to my home network.

In the wireguard profile, I have remote DNS setup for 192.168.0.115 I run on the remote network with host mappings.

If I connect to the wireguard server from e.g. LTE, I can connect to the hostnames via 192.168.0.115 DNS server without a problem.

If I connect to the wireguard server from MT1300, the DNS server is still the MT1300’s one, not the remote network one, so I cannot connect to the hostnames via DNS entries.

I fixed it via editing hosts file on MT1300, which works, but that’s not too elegant. Any idea why the DNS requests always come to MT1300 despite DNS entry in the WG profile saying otherwise?

TIA

Please try to disable this option

Thanks, that’s already disabled.

I googled around and this DNS issue seems like wider OpenWRT issue: Wireguard + DNS in 21.02.x - #3 by psherman - Installing and Using OpenWrt - OpenWrt Forum

Could you upload your wireguard profile with keys masked? Better by a file to check the raw content.
Maybe the DNS is not parsed right by accident.

Thanks, appreciate it, I looked a bit into it, the DNS routing in OpenWRT is a black magic, ton of options to configure dnsmasq, then also the DHCP server what it gives out as DNS (there’s so called "option 6, when you can basically instruct DHCP in OpenWRT to hand out 3rd party servers, not its default router localhost), when it uses forwarded DNS, when you define a different upstream one, when it excludes e.g. “.lan” domains.

I think I’ll handle this OK after ton of experimentation, thanks for your offer to help!

1 Like

I’m experiencing the same thing.

What’s more interesting is that if you go to the router’s diagnostics via LuCI, you’ll see that the router itself can’t resolve addresses on the WireGuard network, despite the DNS settings being in Automatic and the “DNS from WireGuard” being the proper address. The router just won’t use it, at all, ever.

If you set your client’s DNS server manually to the WireGuard server, it works perfectly.