Cover Image: OpenVPN Specific Version
Photo by Privecstasy on Unsplash

January 13, 2026

OpenVPN Specific Version

development devops

From time to time, VPN servers use older software, requiring an older OpenVPN version that isn't always available in the repositories of your chosen Linux distribution.

This post shows you how to build OpenVPN 2.5.9 from source.

Disclaimer

Building OpenVPN 2.5.9 from source does NOT install:

  • The NetworkManager OpenVPN plugin
  • GUI import capability (.ovpn files)

That functionality is provided by network-manager-openvpn, which is an apt package and is safe to install even if OpenVPN itself is held or removed.

Install required dependencies

sudo apt update
sudo apt install -y build-essential autoconf automake libtool pkg-config \
    libssl-dev liblzo2-dev libpam0g-dev libsystemd-dev gettext wget

Download OpenVPN 2.5.9 Source

wget https://swupdate.openvpn.org/community/releases/openvpn-2.5.9.tar.gz

Extract the files:

tar xzf openvpn-2.5.9.tar.gz
cd openvpn-2.5.9/

Configure and Compile

Configure the build:

./configure --prefix=/usr/local

Compile:

make -j$(nproc)

Install:

sudo make install

That installs binaries into /usr/local/sbin and config files under /usr/local/etc/openvpn.

Verify Installation

/usr/local/sbin/openvpn --version

You should see OpenVPN 2.5.9.

Symlink and Hold

To ensure that the package isn't overwritten by your package manager when using apt (Debian-based distros), you can use the following command:

sudo apt-mark hold openvpn

To use the newly installed version as the default system command, create a symlink to the existing openvpn binary path:

sudo ln -nfs /usr/local/sbin/openvpn /usr/sbin/openvpn

Now you are ready to connect to your VPN server.

If you find any typos or incorrect information, please reach out on GitHub so that we can have the mistake corrected.

Hire Me?

I work as a freelancer in my company 7th Green, specializing in PHP development and DevOps. My main strengths include TYPO3, PHP in general, DevOps and Automation.

Please reach out, I will be happy to talk about your project.