How to Configure OpenVPN Server on CentOS 7.3

On this tutorial, I am going to show you how install OpenVPN Server on CentOS 7.3. OpenVPN Server is a powerful VPN service that can be easily installed on most Linux Distribution. If you are running Ubuntu, you may check my previous tutorial to install OpenVPN on Ubuntu 16.04 server. I run a low cost CentOS 7.3 server on Digital Ocean. If you need a low cost cloud server I highly recommend you to try DigitalOcean. You may choose and configure your own server specifications etc. In order to create an OpenVPN Server on CentOS 7.3.

Why we need VPN?

If the internet privacy is matter, VPN is a must for you. With VPN, we can surf the internet safer. A virtual private network (VPN) extends a private network across a public network, and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network (Wikipedia).

Steps to install OpenVPN Server on CentOS 7.3

Before we go through the installation process, we need to make sure we have update our CentOS system. Use the following command to update CentOS 7.3.

yum update

Instead of manually configuring OpenVPN, we can use the script to automatically install and configure OpenVPN on CentOS 7.3.

First, log in to the CentOS server via ssh.

ssh root@your-ip-address

Download the script

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

Run the script

bash openvpn-install.sh

Now follow on screen installation wizard

install openvpn server on centos 7.3

Once finished, you will see the following on your ssh screen

Created symlink from /etc/systemd/system/multi-user.target.wants/openvpn@server.service to /usr/lib/systemd/system/openvpn@.service.

Finished!

Your client configuration is available at /root/dhani-openvpn.ovpn
If you want to add more clients, you simply need to run this script again!

Next, you will need to copy the .ovpn settings to your local computer created on the previous step. You may use scp command to copy the config file.

cp root@139.59.123.13:/root/dhani-openvpn.ovpn /home/dhani/Desktop

Change the IP address and the directory with yours. Now you can connect to your OpenVPN Server. Please read my example on how to use this .ovpn config file to connect to OpenVPN Server.

Admin

One Comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.