How to upgrade OpenVPN version 2.3 to 2.4 on Debian/Ubuntu

There are are some important security updates are done with the OpenVPN version 2.4 compared with 2.3. So if you are using the old version, you can upgrade it to 2.4 by keeping the current configurations including the files, certificates, and other settings. 

Here I am providing the steps to do the upgrade:

  1. Backup the current configuration files for safety. 
  2. Check the current version using the command:
    # openvpn --version
  3. Import the public GPG key that is used to sign the packages:
    # wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg|apt-key add -
  4. Create a new source list to find the updated OpenVPN packages:
    # echo "deb http://build.openvpn.net/debian/openvpn/<version> <osrelease> main" > /etc/apt/sources.list.d/openvpn-aptrepo.list 

Where the <version> can be one of the following:

stable: stable releases only - no alphas, betas or RCs

testing: latest releases, including alphas/betas/RCs

release/2.3: OpenVPN 2.3 releases

release/2.4: OpenVPN 2.4 releases, including alphas/betas/RCs

Replace <osrelease> with the required one from the above list.

The area <osrelease> depends your distribution:

wheezy 

jessie

precise 

trusty 

xenial

You can check it from your OS and use the appropriate one.

Eg: # echo "deb http://build.openvpn.net/debian/openvpn/stable jessie main" > /etc/apt/sources.list.d/openvpn-aptrepo.list

5. Run an update.

# apt-get update

6. The upgrade the OpenVPN package:

# apt-get --only-upgrade install openvpn
7. Once the upgrade is done, please verify the new version and also check if the old configurations are still there.
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install and Use Docker on Ubuntu 16.04

Introduction Docker is an application that makes it simple and easy to run application processes...

Change Main IP of the server :: Vesta Panel

If we are changing the main IP of a server installed with Vesta panel, we can use the following...

cPanel: Apache-FastCGI Data Timeout Error

If you are using a cPanel server and have FastCGI enabled in Apache, you might be facing the...

Domainkey installer in cPanel

You can use the following cPanel script to install domainkey for an account...

Email issues :: Common Troubleshooting Steps

Here I will discuss some common errors and their solution: We are using a mail relay setup for...