RHEL 8 Install open VPN server

This article will show you how to host a vpn server on RHEL 8 via open VPN, the open VPN can be an option when you outside your home and want to access your home network.

Keep your system up to date

On RHEL 8, run below command with admin privilege

dnf update

Install open VPN server package

Once have you system updated, follow open VPN official link to install vpn server

Remove existing package if any

dnf -y remove openvpn-as-yum

Install RPM for RHEL 8

dnf -y install https://as-repository.openvpn.net/as-repo-rhel8.rpm

Example ouput

========================================================================================================================================================================================================================================================================
 Package                                                             Architecture                                                Version                                                        Repository                                                         Size
========================================================================================================================================================================================================================================================================
Installing:
 openvpn-as-yum                                                      noarch                                                      rhel8-1                                                        @commandline                                                      8.9 k

Transaction Summary
========================================================================================================================================================================================================================================================================
Install  1 Package

Total size: 8.9 k
Installed size: 3.3 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                1/1 
  Installing       : openvpn-as-yum-rhel8-1.noarch                                                                                                                                                                                                                  1/1 
  Verifying        : openvpn-as-yum-rhel8-1.noarch                                                                                                                                                                                                                  1/1 
Installed products updated.

Installed:
  openvpn-as-yum-rhel8-1.noarch  

Install openvpn

dnf -y install openvpn-as

Example output

To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpn-init tool.

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server 2.13.1 has been successfully installed in /usr/local/openvpn_as
Configuration log file has been written to /usr/local/openvpn_as/init.log


Access Server Web UIs are available here:
Admin  UI: https://you-server-ip:943/admin
Client UI: https://you-server-ip:943/
To login please use the "openvpn" account with "password-generated-XXX-YYY-ZZZ" password.
(password can be changed on Admin UI)
+++++++++++++++++++++++++++++++++++++++++++++++


  Verifying        : openvpn-as-2.13.1_d8cdeb9c-1.el8.x86_64                                                                                                                                                                                                       1/14 
  Verifying        : openvpn-as-bundled-clients-30-1.noarch                                                                                                                                                                                                        2/14 
  Verifying        : mpdecimal-2.5.1-3.el8.x86_64                                                                                                                                                                                                                  3/14 
  Verifying        : python3.11-cffi-1.15.1-1.el8.x86_64                                                                                                                                                                                                           4/14 
  Verifying        : python3.11-idna-3.4-1.el8.noarch                                                                                                                                                                                                              5/14 
  Verifying        : python3.11-lxml-4.9.2-3.el8.x86_64                                                                                                                                                                                                            6/14 
  Verifying        : python3.11-ply-3.11-1.el8.noarch                                                                                                                                                                                                              7/14 
  Verifying        : python3.11-pycparser-2.20-1.el8.noarch                                                                                                                                                                                                        8/14 
  Verifying        : python3.11-setuptools-65.5.1-2.el8.noarch                                                                                                                                                                                                     9/14 
  Verifying        : python3.11-setuptools-wheel-65.5.1-2.el8.noarch                                                                                                                                                                                              10/14 
  Verifying        : python3.11-cryptography-37.0.2-5.el8.x86_64                                                                                                                                                                                                  11/14 
  Verifying        : python3.11-pip-wheel-22.3.1-4.el8.noarch                                                                                                                                                                                                     12/14 
  Verifying        : python3.11-3.11.5-1.el8_9.x86_64                                                                                                                                                                                                             13/14 
  Verifying        : python3.11-libs-3.11.5-1.el8_9.x86_64                                                                                                                                                                                                        14/14 
Installed products updated.

Installed:
  mpdecimal-2.5.1-3.el8.x86_64                openvpn-as-2.13.1_d8cdeb9c-1.el8.x86_64           openvpn-as-bundled-clients-30-1.noarch   python3.11-3.11.5-1.el8_9.x86_64           python3.11-cffi-1.15.1-1.el8.x86_64   python3.11-cryptography-37.0.2-5.el8.x86_64  
  python3.11-idna-3.4-1.el8.noarch            python3.11-libs-3.11.5-1.el8_9.x86_64             python3.11-lxml-4.9.2-3.el8.x86_64       python3.11-pip-wheel-22.3.1-4.el8.noarch   python3.11-ply-3.11-1.el8.noarch      python3.11-pycparser-2.20-1.el8.noarch       
  python3.11-setuptools-65.5.1-2.el8.noarch   python3.11-setuptools-wheel-65.5.1-2.el8.noarch  

Complete!

Configure your open VPN server

After above steps, you should have your openvpn server successfully installed.

Use the account and credentials mentioned above to login to VPN server, retrieve a activation key (free for 2 connection)

You can continue to configure the VPN server with official help doc.

Update default admin credentials

Once you have open VPN installed successfully, you may want to change the default generated admin user password, go to User Management -> User Permissions, click More Settings and there’s a field to let you update password

Reference

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

Scroll to Top