Setting up an OpenVPN connection in Ubuntu

October 2016

Setting up an OpenVPN connection in Ubuntu

To be complete on the subject, we'll see how to set up a VPN using OpenVPN software on Ubuntu. OpenVPN allows peers to authenticate each other using a private shared key in advance, certificates or pairs of usernames / passwords.

It makes intensive use of the library and OpenSSL authentication protocol SSLv3/TLSv1.

Available in Solaris, Linux, OpenBSD, FreeBSD, NetBSD, Mac OS X, Windows 2000, XP and Seven, it also offers many security features and control.
  • The first thing to do is install the following package: network-manager-openvpn.
  • Run this command in a terminal:

sudo apt-get install network-manager-openvpn
  • Once the package is installed, restart Ubuntu.
  • Click the Network icon in the systray, then "VPN Connections"and then "Configure VPN ...".
  • Click "Import"and select your OpenVPN key provided via email(example: "VPNPremier - Carbon2.ovpn).
  • Your connection will be created with all the necessary data.
  • Click Open.
  • Enter the login and password when registering the VPN service, then click Apply.
  • Your connection now appears in the VPN tab of your network settings.
  • To start your VPN connection, click the network icon in the systray, then "VPN Connections"and select the connection you just created.
  • At the first login click Always Allow.
  • After a few seconds the connection is established, you can see through the padlockdisplayed on your connection.

Related :

This document entitled « Setting up an OpenVPN connection in Ubuntu » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.