How to start VPN (openvpn) automatically at startup?

Hello all, I have a question regarding setting up NordVPN on Mate:

Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

I know from a command line it works fine after installation as per the NordVPN instructions:

$ nordvpn status
Status: Connected
Current server: uk1954.nordvpn.com
Country: United Kingdom
City: London
Your new IP: Not_going_to_put_this
Current technology: OpenVPN
Current protocol: UDP
Transfer: 390.73 KiB received, 130.69 KiB sent
Uptime: 5 minutes 27 seconds

There are instructions on the NorDVPN website, but these do not match the reality of the system

https://support.nordvpn.com/Connectivity/Linux/1047410192/Linux-start-on-boot-manual-connection.htm#:~:text=Auto-connect%20OpenVPN%20via%20Network%20Manager%20(Ubuntu)&text=Once%20the%20VPN%20connection%20is,VPN%20connection%20you%20previously%20created.

I have the regular network management functions and connection editor:

I am semi competent but have not been able to set up the VPN to be started and connected by default.

Any help, pointers, tips, websites that can help me please? (I have googled but with no luck)

Thanks
Andy

Hi
1 - Edit your VPN connection in the network manager.
At the end of of the password field (vpn tab), make sure to click on the little icon and choose something along the lines of «save the password for all users» then save.

Use this tutorial if you have not created your VPN connection using the network manager.

2 - Edit your wired connection in the network manager.
Tick «automatically connect to VPN» and choose the one you want to connect to then save.
Now you should be able to connect to your VPN automatically on startup.

2 Likes

Hi All, further to the above I actually sorted it not using network manager. it was far simpler than I first realised. Simply issue a

nordvpn set autoconnect on

Command and everything worked as I wanted. Nice!

Andy

Exactly what i was looking for , thanks!

1 Like