Introduction
OpenVPN is a widely popular VPN used by many, It provides site-to-site connections and remote connectivity functionality. It provides both server-side and client-side applications. It is suitable for private and small business use. For more detailed information, please see the official Manpage. In this article, we will look into the installation of the OpenVPN server.
Installation of OpenVPN
- Update your local system.
$ sudo apt update -y
$ sudo apt upgrade -y - We will be running the official OpenVPN script that will install the OpenVPN server.
$ curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
$ chmod +x openvpn-install.sh - Run the bash installation script as shown below.
$ sudo bash openvpn-install.sh
- Upon the first run, the script will run and help in configuring the OpenVPN server as per the user inputs. Also, Please provide client details to generate the required certificates. Once the installation is done, a client configuration file will be written under the current working directory. It is used for configuring your OpenVPN client.
- Start and enable the OpenVPN service.
$ sudo systemctl start openvpn
$ sudo systemctl enable openvpn - Make sure the OpenVPN daemon is listening.
$ sudo ss -tupln | grep openvpn
Please check the official OpenVPN guides on the steps to configure the OpenVPN client.