All VPN configs connect on OS boot instead of just one?

Hi. I imported four WireGuard configs for my VPN service and whenever I reboot the OS, all four of them connect on boot, which forces me to have to manually disconnect three of them. How do I set it up, so only one of the VPN configs connects on OS boot? I tried to edit the config files of the WireGuard connections, but it doesn’t appear to allow me to do this. I also tried to edit the actual internet connection settings to set up auto connect to only one of those WireGuard configs, but it didn’t seem to do anything.

Yes that’s correct, just edit your vpn connection and in General you will see a setting for automatic connecting. ( uncheck that setting )

I have tried that, and it doesn’t let me save the changes. Look at the SS below, and you can see that when i uncheck the automatic connection button, the apply button in the bottom right corner will not allow me to save it. All four of those VPN connections will say ‘connected’ when I reboot the OS.

In NetworkManager it allows me to uncheck the box and save the changes. On NetworkManager I just right click and select Edit Connections.

Are you doing this to a VPN profile or your normal internet connection?

I can edit my internet connection but not the actual VPN profiles, which are the ones I need to edit because they are by default selected to auto connect as far as I can tell.

I’ve been having the same problem for about the last month. I believe I found a relevant bug report on the network manager gitlab. I can uncheck the autoconnect box all I want, but it doesn’t save.

I found the bug report that I think this is related to. I do know that this was not a problem a month ago. I’m not sure if it has been exactly one month since this problem started, but it has been two weeks minimum.

Fair enough, at least now I know it’s an actual bug. Thanks for sharing.

Happy to be of service.

I’m doing this on my Wireguard connections.

I wonder if it works if you first uncheck and save ‘all users’?

Otherwise, if it is network manager, you could try using the nmcli command line tool.

1 Like

Using nmcli command line tool does seem to work. Thanks for the suggestion.

1 Like

@samarium suggested using nmcli to make the change and I believe I have found the way to do it contain in this longer answer in this post

When I have to use nmcli I often have a perfectly logical way of doing what I want, and it doesn’t work, and have to backtrack a few times until I do it the “network manager way” so I hope you have better luck.

I’m not sure what is wrong as I can enable my Wireguard connection on boot and save. ( Works as it should ) Then disable Wireguard connection on boot and save. ( Works as it should ) You have another problem causing this issue.

The command I used was nmcli connection modify [connection name] autoconnect no. It worked just fine.

1 Like

Maybe it depends on what tool you used to generate the wireguard profiles. I used mullvad and KDE’s network manager gui doesn’t allow me to edit those profiles. Using nmcli on the command line worked though. I can edit other connections using KDE’s gui though.

I just used this from the ArchWiki.

# nmcli connection import type wireguard file /etc/wireguard/wg0.conf

I used the KDE network manager gui to import mine.

Did you create a WireGuard connection or did you import a config file for your WireGuard connection? I imported my config file from Mullvad and am experiencing this issue.