Hi,
I’m trying to create a manual wireguard VPN connection following the vpn provider’s instructions on how to use Network Manager for this.
I have installed wireguard-tools. I have imported the wireguard config file to Network Manager using nmcli, the wireguard connection has been created and activated automatically and everything seems to be working fine except for one thing.
There seems to be an issue with the dns addresses. Since I need static IP’s for my LAN connections, I’m configuring Network Manager’s IPv4 connections manually on the LAN adapter’s profile. This means that I put specific addresses for a Primary and a Secondary dns server on the LAN adapter’s profile.
The wireguard config file contains the vpn’s dns addresses. As a result, when I check for dns leaks after the vpn connection is established, the check shows that both the LAN profile’s and the wireguard profile’s dns addresses are used. This of course means that there is a leak.
If I remove the dns addresses from the LAN adapter’s profile, and leave the wireguard profile’s dns addresses intact, no dns connections are made at all, since the site names are not resolved.
If I use my gateway’s IP address as dns on the LAN adapter’s profile, and leave the wireguard profile’s dns addresses intact again, the dns leak test shows that the connection is using both my internet provider’s dns’s and the vpn provider’s dns’s. Leak again.
The only way to have no dns leaks at all is to place the vpn provider’s dns addresses in both the wireguard’s and the LAN adapter’s Network Manager profiles.
The only thing I haven’t tried yet is to remove the vpn’s dns addresses from the wireguard profile and just keep them on the LAN adapter’s profile. I figured since they exist in the wireguard config file, they have to remain there.
Is this the only way to create non-dns-leaking wireguard connections using Network Manager? Do I have to place the dns addresses provided by the vpn service in both the wireguard’s and the LAN adapter’s Network Manager profiles?
Thank you.