I'm running Wireguard to manage my VPN. I need to be able to use a VPN to access our staging server periodically. Most of the time, by default, I don't want to use the VPN.
Even if I disable the VPN (by toggling the button in the "Network" box), if my machine goes to sleep, when I wake it the VPN is re-enabled.
Is there any way to store the settings, so they're there when I want to turn on my VPN, but not default to keeping the VPN always on.
I don't see any settings options that look like they would let you manage auto connecting.
What seemed like it worked was to check the "Use this connection only for routes on its network." box in the IPv6 settings (that toggled it for IPv4 as well).
That stopped working after a few days.
sudo systemctl enable wg-quick@wg0to enable it, orsudo systemctl disable wg-quick@wg0to disable it, see docs: https://documentation.ubuntu.com/server/how-to/wireguard-vpn/common-tasks/index.html – Luuk Jul 08 '25 at 16:00