Wireguard
setup:
https://github.com/angristan/wireguard-install
connect (if GUI failed, using GNOME, KDE supports wireguard via GUI):
nmcli connection import type wireguard file wg0.conf
off:
nmcli connection down wg0
on:
nmcli connection up wg0
OpenVPN
Autostart OpenVPN
https://askubuntu.com/questions/1037723/openvpn-autostart-ubuntu-18-04
If you save your configuration as a MY_CONNECTION.conf file in your /etc/openvpn directory, you can do the following:
systemctl enable openvpn@MY_CONNECTION
systemctl start openvpn@MY_CONNECTION
where MY_CONNECTION is the same from MY_CONNECTION.conf.
So if you have multiple connections, you would have multiple systemctl calls.
systemctl enable openvpn@MY_CONNECTION1
systemctl start openvpn@MY_CONNECTION1
systemctl enable openvpn@MY_CONNECTION2
systemctl start openvpn@MY_CONNECTION2
etc.