Unwanted automatic connection to wireguard connection on login

I have a wireguard connection configured in Networkmanager for one of my accounts, and when I login there it always gets activated, whether I had enabled it in the most recent session or not. I usually do not want this VPN enabled, and only need it on occasion, so it’s annoying that it gets enabled (it’s meant to route all my traffic when I use it).

In other words it seems I have the reverse problem from How to get WireGuard working on boot/startup :wink:

I have nothing in ~/.config/systemd, and there are no “secondaries” or any setting like that in any of my Networkmanager profiles.

I’m at a loss as to what configurations there may be that affects this behaviour. What could it be?!

I use regular Fedora Silverblue 41, so it’s a plain Fedora Gnome desktop.

This is how you can disable autoconnect for NetworkManager/WireGuard:

nmcli connection show
nmcli connection modify CON_NAME autoconnect no
3 Likes

That was it. I was confused by this setting not being anywhere in my system-connections, and in another account I have an OpenVPN connection that doesn’t mention it either, where it seems to default to autoconnect being off if you haven’t set that setting.

Anyway, problem solved, so thank you!

1 Like