×


OpenVPN on Linux

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.


[Need urgent assistance with Linux queries? – We are here to help you. ]


Conclusion

This article will guide you on steps to set up OpenVPN on Linux.

OpenVPN config files (. ovpn) offer an easy way to configure #OpenVPN on your computer to work with our servers. These files contain the correct cipher types, #Certificate Authority, Certificate, and Private Keys. You can use these files on Mac, Linux, #Windows, Android, and iOS.

By default the OpenVPN Access Server comes configured with OpenVPN daemons that listen on port 1194 UDP, and OpenVPN daemons that listen on port 443 TCP. While the best connection for an OpenVPN #tunnel is via the #UDP port, we implement TCP 443 as a fallback method.

To Set up OpenVPN Server on Ubuntu #Linux:

1. Find and note down your public IP address.

2. Download openvpn-install.sh script.

3. Run openvpn-install.sh to install OpenVPN server.

4. Connect an OpenVPN server using iOS/Android/Linux/Windows client.

5. Verify your connectivity.