Setup OpenVPN with Ubuntu NetworkManager

Setting up OpenVPN on NetworkManager on Ubuntu can be a PITA, but not if you follow these steps!

Prerequisite

  • Ubuntu 18.04+ or 16.04 (preferably with Gnome Desktop Manager)
  • OpenVPN 2.4+

Ubuntu 16.04 ships OpenVPN 2.3+, it's quite easy to upgrade it:

sudo curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | sudo apt-key add
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
sudo apt update
sudo apt install -y openvpn

Step-by-step

First of all, install the NetworkManager OpenVPN extension.

sudo apt install network-manager-openvpn-gnome

Then create a new network using NetworkManager's settings.

On the type of network selection screen, select VPN.

NM Select network

Then Import from file....

NM Select ovpn

And select the file that support@sparkfabrik.com sent you. The file name should be similar to:

firewall-UDP4-1194-edoardo.dusi-config.ovpn

IMPORTANT FINAL PART

When you review the settings that NM imported, enter the username and password given to you by support and then check the option Store the password for all users on the password's options.

NM All Users

There you go

NM Connected

Last updated on 27 Feb 2024