Install Your Own VPN Server – OpenVPN on CentOS 7

In this tutorial we’ll install OpenVPN VPN server on VPS or dedicated server. OpenVPN is an open-source software application that implements virtual private network techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities.

OpenVPN can be used in OpenVZ, KVM and Dedicated environment, For Openvz virtualization type you need to do extra config like “TUN/TAP” need to enabled from backend now days this options are available directly under server management panel you can easily turn it on and off. For KVM and Dedicated server “TUN/TAP” enabling is not needed.

Lets get started with installation :-

Install Net-Tools :

yum install net-tools -y

Now we’ll install OpenVPN on Centos 7 :

you can download latest version from here : CLICK HERE

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

After running the install command it will output similar result :

[root@srv1 ~]# rpm -i https://openvpn.net/downloads/openvpn-as-latest-CentOS7.x86_64.rpm

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

Please enter "passwd openvpn" to set the initial
administrative password, then login as "openvpn" to continue
configuration here: https://107.154.44.444:943/admin

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

+++++++++++++++++++++++++++++++++++++++++++++++
Access Server Web UIs are available here:
Admin  UI: https://107.154.44.444:943/admin
Client UI: https://107.154.44.444:943/
+++++++++++++++++++++++++++++++++++++++++++++++

Beginning with OpenVPN AS 2.6.0 compression is disabled by default and on upgrades as security patch.

At this point you’ve successfully installed OpenVPN VPN server successfully now you need to run this command to change the password :

passwd openvpn

And choose your admin passwod for GUI.

Now you can access OpenVPN GUI from web browser :

Admin UI: https://ip:943/admin
Client UI: https://ip:943/

To download OpenVPN client:

goto : https://ip:943/ and use the admin username “openvpn” and admin password then you’ll see option for download the client. You can then install it on your pc and start using the vpn.

You need to use this credential to login as admin :-

Admin UI: https://ip:943/admin

username : openvpn
password : yourpassword

Changing OpenVPN ports :

You can change the defaults ports by login as admin and navigate to : “Configuration” >> “Network Settings

Back to top button