How to Install OpenVPN on CentOS

This tutorial will help you to install OpenVPN easily with a simple script.

Why i need VPN? In today’s world, Govt of different countries are blocking the most commonly used application worldwide, i.e in U.A.E you may face an issue when using skype or whatsapp for audio/video calling, Its banned in U.A.E but you still want to use these features so you need a VPN to use these blocked features. VPN is also used for security purposes, lets say you want to open some sites which you dont want your ISP or local administrator of your network to monitor you may use a vpn and its easy to install OpenVPN by using the below method.

So how to setup the VPN Easily and what are the requirements?

To install openvpn on CentOS, Ubuntu or Debian You just need a VPS the cheapest one, ( I am using Theonionhost.com VPS in this tutorial) and luckily i have found a script on GitHub repo created by Nyr which is very easy to use and setup may take 2 to 3 minutes.

Let’s Start,

Vps setup is instant after ordering and I choose CentOS 7 so we are ready to answer the question How to install openvpn on centOS VPS

how to install openvpn using a simple script
OPENVZ VPS from Theonionhost.com

Just to make sure everything is updated run the command

yum update -y

Now

Run the script and follow the assistant:

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

openvpn hassle free installation
copy and paste the wget command to shell terminal of the VPS

When you press the enter the installation procedure will start automatically and you just need to answer few basic questions to setup the VPN automatically. see the image below

road warrior openvpn installer
IPv4 selection Just press enter

Select UDP as default.

simple openvpn install script
Select UDP as default protocol by typing 1 and then press enter

It will then ask you for the default port you want to use. I left the default selection intact and used 1194 port.

openvpn default port
Listening port selection for OpenVPN

It will then ask you for the DNS resolver you want to use, I prefer Google DNS its totally upto you which DNS you want to use.

google dns
DNS FOR VPN

It will ask you for the client name for certificate issuance, please keep that in mind you can only use one word and no special character is allowed to use.

openvpn installation tutorial

Finally the installation will begin and it will take 10 seconds to install the OpenVPN on your VPS.

setup openvpn on a vps server
OpenVPN installation using road warrior installer (Script) is completed.

after the installation is completed, you are ready to use the OpenVPN as you please.

just install openvpn client on your pc or mobile and copy paste the /root/stromind.ovpn data to start your VPN.

Note: stromind.ovpn is the configuration file of your VPN it should show a different name if you choose a different client name while installing via this script.

I am sure that now you are able to install the OpenVPN on CentOS Ubuntu and Debian.

GitHub Repo:
https://github.com/Nyr/openvpn-install

Thanks to the author of this script which makes it easy to install openvpn