Skip to main content
Topic: OpenVPN CentOS 7 Setup Private VPN :) (Read 604 times) previous topic - next topic

OpenVPN CentOS 7 Setup Private VPN :)

Introduction OpenVPN is a full-featured SSL VPN (virtual private network). It implements OSI layer 2 or 3 secure network extension using the SSL/TLS protocol. It is an open source software and distributed under the GNU GPL. A VPN allows you to connect securely to an insecure public network such as wifi network at the airport or hotel. VPN is also required to access your corporate or enterprise or home server resources. You can bypass the geo-blocked site and increase your privacy or safety online. This tutorial provides step-by-step instructions for configuring an OpenVPN server on CentOS Linux 7 server.

Procedure: CentOS 7 Set Up OpenVPN Server In 5 Minutes
The steps are as follows:

Step 1 – Update your system
Run the yum command:
{dedi@centos7:~ }$ sudo yum update

Step 2 – Find and note down your IP address
Use the ip command as follows:
{dedi@centos7:~ }$ ip a
{dedi@centos7:~ }$ ip a show eth0

Step 3 – Download and run script
I am going to use the wget command:
{dedi@centos7:~ }$ wget -O

Setup permissions using the chmod command
{dedi@centos7:~ }$ chmod +x

One can view the script using a text editor such as vim/vi :
{dedi@centos7:~ }$ vi

Now all you have to do is:
{dedi@centos7:~ }$ sudo ./

VPN client config
At the end of the installation, you need to provide a client name. We can choose client names such as desktop for desktop VPN client or ios for Apple iPhone and so on. We can also encrypt the private key with a password for added security. So every time you start a VPN session, you need to provide a password for added security reasons:

{dedi@centos7:~ }$ sudo systemctl stop openvpn@server #<--- stop server
{dedi@centos7:~ }$ sudo systemctl start openvpn@server #<--- start server
{dedi@centos7:~ }$ sudo systemctl restart openvpn@server #<--- restart server
{dedi@centos7:~ }$ sudo systemctl status openvpn@server #<--- get server status

Next, provide this file to your OpenVPN client to connect:

Apple app store: Apple iOS client
Google play store: Android client
Apple MacOS (OS X) client
Windows 8/10 client

If you need a powerful VPS to create your Private VPN , you can always order at my website (Optional)

Thanks everyone and if you have any question just let me know down in the comments below.