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

  • 5

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.

Was this answer helpful?

« Back