I am also experiencing DNS issues using a Wireguard client file on my GL-MT1300 router using an upgraded beta version of the firmware openwrt-mt1300-4.1.0-1107-1667792228.bin. I also experienced the problem on older versions of the firmware.
The router seems to use DNS servers from my VPS, which is in this case from the network Vultr, instead of the DNS servers specified by the Wireguard server. When I connect directly to the Wireguard server from my laptop, instead of connecting to the Wireguard server at the router level, the correct DNS servers are used.
The Wireguard client configuration file looks like (some values are removed for privacy):
PrivateKey = [redacted]
Address = 10.x.x.x ,2x:x:x::x
DNS = 172.x.x.x, fx::x:x
PublicKey = [redacted]
PresharedKey = [redacted]
AllowedIPs = 0.0.0.0/0,::/0
Endpoint = [redacted]:51820
The Wireguard server was setup with the following script, so the configuration should be expected to be “proper” and “standard”: GitHub - trailofbits/algo: Set up a personal VPN in the cloud.
The script sets up the Wireguard server to use Cloudflare for DNS and also sets up ad-blocking: algo/config.cfg at master · trailofbits/algo · GitHub.
This is a longer form of my question asked here Wireguard client not honoring DNS setting [workaround discovered] - #42 by agnelli. The discussion there varies widely with no clear solution, so I have created a new thread.
Can you use the following command in the router to view the DNS Settings?
uci show dhcp
@ luochongjun To run the commands I installed the software luci-app-commands.
The first command “cat /tmp/resolv.conf.d/resolv.conf*” gives the following message:
# cat "/tmp/resolv.conf.d/resolv.conf*"
cat: can't open '/tmp/resolv.conf.d/resolv.conf*': No such file or directory
The second command “uci show dhcp” gives the following message:
# uci show dhcp
You’re my only hope in resolving this issue
Please try the new firmware.
Thank you! That appears to have fixed the issue.
I went from the beta version of the firmware 4.1.0 beta3 to version 4.2.1 snapshot (Date Compiled: 2023-05-05 16:55:57). This solved the issue.
I cannot seem to downgrade to the stable version 3.216, but I suppose snapshot 4.2.1 if fine.
We plan to release 4.3.2 version of MT1300 at the end of June.