Are you trying to setup OpenVPN on Linux?
This guide will help you.
The security we are talking about with a VPN has little to do with the operating system in use. Windows and Linux both send and receive packets of data on the internet in the same way.
It does not matter if your device is using Windows, Linux, or Mac OS to navigate the web, the packets are the same.
OpenVPN is a full-featured, open-source Secure Socket Layer (SSL) VPN solution that accommodates a wide range of configurations.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform Linux related installations.
In this context, we shall look into steps to set up an OpenVPN server on an Ubuntu server and then configure access to it from Windows, macOS, iOS and/or Android.
More information about OpenVPN ?
The OpenVPN software bundle is an open-source Secure Socket Layer (SSL) VPN solution that accommodates a wide range of configurations. It mainly comprises of three parts.
They are OpenVPN-AS Server, Admin Web Interface/Admin GUI, and Connection Client.
i. The primary component of OpenVPN-AS Server is the VPN server. It handles the main functionality on the backend. Also, it include a Web GUI, which helps to manage many of the underlying elements of the software.
ii. The Main Web Interface allows for easy management of the OpenVPN server components. The admin can control routing options, permissions, network settings, user authentication, and other settings in the WebGUI.
iii. OpenVPN Connect Clients software is a part of the OpenVPN server, which allows users to connect to the VPN server directly.
Steps to set up OpenVPN on Linux ?
Follow the process below to set up the OpenVPN.
Setup OpenVPN on CentOS
Here is the command that we run in CentOS to install the OpenVPN:
# yum -y install https://as-repository.openvpn.net/as-repo-centos7.rpm
# yum -y install openvpn-as
How to Set up OpenVPN on Ubuntu ?
Here is the command we run in Ubuntu Servers to install VPN server:
# apt update && apt -y install ca-certificates wget net-tools
# 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
How to install OpenVPN from Source ?
Other source install options are also available from the Alternative OpenVPN.
Below are the commands for them.
For Ubuntu or Debian Source Install:
$ dpkg -i openvpnasdebpack.deb
For CentOS, RHEL, or Fedora Source Install:
$ rpm -i openvpnasrpmpack.rpm
How to Set up OpenVPN Admin User ?
After installing the OpenVPN-AS server, we need to setup the Admin account via terminal. For that, we run the following commands. Make sure that you change the password.
[root@host ~]# passwd openvpn
Changing password for user openvpn.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@host ~]#
Once you have set the admin password, log into the WebGUI with the below details.
Username: openvpn
Password: (yourpassword)
URL : https://serverip:943/admin
How to Configure the Admin Web Interface ?
After setting up the initial settings, now you will be able to access the WebGUI interface via a web browser using this address:
Admin: https://serverip:943/admin
After logging in, a license screen will be present.
Now, click Agree to accept the license and move into the main configuration interface.