How to Install OpenVPN Access Server on Linux

0

In this tutorial you will learn how to install OpenVPN access server software on all linux distros that OpenVPN supports. OpenVPN supports Ubuntu, Debian, RHEL, CentOS and Amazon Linux 2.

You can install OpenVPN access server software via official repository or manually download the package files to your server/computer and manually install them, in this tutorial I'll cover both methods.

Let's start with the first option and the recommended option by OpenVPN, by downloading and installing OpenVpn access server software via official repository.

Option 1 - Install OpenVPN access server software via Official Repository

Install OpenVPN on Ubuntu

Install on Ubuntu 20 (32/64 bit )

Type the command below to install openvpn on ubuntu 20, if you have previously installed openvpn on your system you can also use the command below to upgrade the existing installation.

apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian focal main">/etc/apt/sources.list.d/openvpn-as-repo.list
apt update && apt -y install openvpn-as

Install on Ubuntu 20 (arm64)

Type the command below in order to install openvpn access server software on ubuntu arm based system.

apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian focal main">/etc/apt/sources.list.d/openvpn-as-repo.list
apt update && apt -y install openvpn-as

Install on Ubuntu 18 (32/64 bit)

Type the command below to install openvpn access server software on ubuntu 18

apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian bionic main">/etc/apt/sources.list.d/openvpn-as-repo.list
apt update && apt -y install openvpn-as

Install OpenVPN on Debian

Install on Debian 10 64bit

apt update && apt -y install ca-certificates wget net-tools gnupg
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | apt-key add -
echo "deb http://as-repository.openvpn.net/as/debian buster main">/etc/apt/sources.list.d/openvpn-as-repo.list
apt update && apt -y install openvpn-as

Install OpenVPN on RHEL

Install on RHEL 7 64bit

yum -y install https://as-repository.openvpn.net/as-repo-centos7.rpm
yum -y install openvpn-as

Install on RHEL 8 64bit

yum -y install https://as-repository.openvpn.net/as-repo-centos8.rpm
yum -y install openvpn-as

Install OpenVPN on CentOS

Install on CentOS 7 64 bit

yum -y install https://as-repository.openvpn.net/as-repo-centos7.rpm
yum -y install openvpn-as

Install on CentOS 8 64 bit

yum -y install https://as-repository.openvpn.net/as-repo-centos8.rpm
yum -y install openvpn-as

Install OpenVPN on Amazon Linux 2

yum -y remove openvpn-as-yum
yum -y install https://as-repository.openvpn.net/as-repo-amzn2.rpm
yum -y install openvpn-as

Once the installation has been completed, then you can proceed with the configuration of your openvpn server.

Option 2 - Manually download OpenVPN package and install them

Ubuntu 20 (32 / 64 bit)

Before you download openvpn, you must install the required dependencies in order for openvpn to work

apt update
apt install -y libc6 libffi7 libgcc-s1 liblz4-1 liblzo2-2 libmariadb3 libpcap0.8 libssl1.1 libstdc++6 zlib1g bridge-utils net-tools libsasl2-2 iproute2 sqlite3 libsqlite3-0 iptables python3-pkg-resources python3-migrate python3-sqlalchemy python3-mysqldb python3-ldap3

then type the commands below to download the package

wget https://openvpn.net/downloads/openvpn-as-latest-ubuntu20.amd_64.deb
wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.deb

sudo dpkg -i openvpn-as-latest-ubuntu20.amd_64.deb
sudo dpkg -i openvpn-as-bundled-clients-latest.deb

Debian 10

Step 1 - Type the command below to install dependencies on Debian 10, then proceed with the installation of openvpn access server software

apt update
apt install -y libc6 libffi6 libgcc1 liblz4-1 liblzo2-2 libmariadb3 libpcap0.8 libssl1.1 libstdc++6 zlib1g  bridge-utils net-tools libsasl2-2 iproute2 sqlite3 libsqlite3-0 iptables python3-pkg-resources python3-migrate python3-sqlalchemy python3-mysqldb libmariadbd19 python3-ldap3

Step 2 - Download and install openvpn access software and OpenVPN Access Server client bundle

wget https://openvpn.net/downloads/openvpn-as-latest-debian10.amd_64.deb

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.deb

sudo dpkg -i openvpn-as-latest-ubuntu20.amd_64.deb

sudo dpkg -i openvpn-as-bundled-clients-latest.deb

RHEL

Type commands below to install openvpn access server and bundled client on Red Hat 7 and Red Hat 8 64 bit

Red Hat 8 (64 bit)

wget https://openvpn.net/downloads/openvpn-as-latest-CentOS8.x86_64.rpm

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm



yum -y install openvpn-as-latest-CentOS8.x86_64.rpm

yum - y install openvpn-as-bundled-clients-latest.rpm

Red Hat 7 (64 bit)

wget https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm


yum -y install openvpn-as-latest-CentOS7.x86_64.rpm

yum -y install openvpn-as-bundled-clients-latest.rpm

CentOS

Type commands below to install openvpn access server and bundled client on CentOS 7 and CentOS 8 64 bit

CentOS 7

wget https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm

yum -y install openvpn-as-latest-CentOS7.x86_64.rpm

yum -y install openvpn-as-bundled-clients-latest.rpm

CentOS 8

wget https://openvpn.net/downloads/openvpn-as-latest-CentOS8.x86_64.rpm

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm


yum -y install openvpn-as-latest-CentOS8.x86_64.rpm

yum -y install openvpn-as-bundled-clients-latest.rpm

Amazon Linux 2

Type commands below to install openvpn access server and bundled client to your amazon aws server

wget https://openvpn.net/downloads/openvpn-as-bundled-clients-latest.rpm

wget https://openvpn.net/downloads/openvpn-as-latest-amzn2.x86_64.rpm

yum -y install openvpn-as-bundled-clients-latest.rpm

yum -y install openvpn-as-latest-amzn2.x86_64.rpm

Conclusion

In this tutorial I explained step by step how to install OpenVPN access server software and OpenVPN  access server bundled on all Linux distros that OpenVPN supports.

By now you should know how to install OpenVPN via its official repository and by downloading the installation files manually.

Author

Endrit Qerreti

Web Development, IT, Linux System Administration, Security Researcher, Computer Technician

Comments