No internet when wireguard is connected

I’ve been using F37 for a while since it was released and Wireguard was working fine.
This happens right after the latest update yesterday.

My laptop Wireguard config:

PrivateKey = redacted
Address =
DNS =,

PublicKey = redacted
PresharedKey = redacted
Endpoint = redacted
AllowedIPs =
PersistentKeepalive = 25

If I change the AllowedIPs to - it works. But i do not want to route everything to Wireguard.

You specify nameservers for the wireguard link, but you do not allow them in AllowedIPs.
If you watch the output of wg-quick, you will see that resolvconf is called with argument “-x”, which means that DNS gets preferred via the wg0 link. Which is not possible.
So ping works, dig @ works, bur resolvectl query domainname and all normal DNS queries do not work because systemd-resolved binds to wg0 to access So if you wanr to access the nameservers via wireguard, add them to AllowedIP’s or remove the DNS statement and specify the nameservers in /etc/systemd/resolved.conf.

1 Like

thank you very much for your explanation and help me solve my problem.
things are back to normal. much appreciated :slight_smile:

one question for education purposes @hmmsjan , why did it work previously though?
did something changed in the OS or it’s a bug that’s only just been fixed in the last update?

I do not know the exact version history, could be NetworkManager, systemd-resolved or wireguard. Key is “DNS Domain = ~.” in resolvectl, specifying a link for global DNS lookup. According to
there has been a change in NetworkManager preventing DNS leaks, so specifying not accessible nameservers for a VPN causes DNS to fail instead of falling back to the normal DNS servers. This should have been happening before.