How to install OpenVPN Server on CentOS 7.3

CentOS Tutorial – This tutorial is going to show you how to install OpenVPN Server on CentOS 7.3. OpenVPN is a free, popular VPN solution for you who needs a secure connection to your network. If you are new to OpenVPN, please read the OpenVPN Wiki first. It will gives you a clear picture about OpenVPN.

Installing OpenPVN on CentOS is pretty easy. There is a script that will automate the process.

What you will need

You need to have a running CentOS 7 family. On this tutorial, I am using CentOS 7.3 server (no GUI). Also you will need root access to the server.

Cloud or Local ?

I highly recommend you to use private cloud server for example AWS, DigitalOcean or Linode. You can deploy low cost cloud server on those providers. 512 MB and single processor is enough for VPN Server.

Steps to install OpenVPN Server on CentOS 7.3

Before we go through, it is important to update CentOS first, to make sure we have the latest stable packages installed on our CentOS system.

Step 1. Update CentOS

yum update

Step 2. Download OpenVPN install script

wget -O

Step 3. Make the script executable

chmod +x

Step 4. Run the installation script


The installation wizard will started and answer some questions shown on the Terminal window

Welcome to this quick OpenVPN "road warrior" installer

I need to ask you a few questions before starting the setup
You can leave the default options and just press enter if you are ok with them

First I need to know the IPv4 address of the network interface you want OpenVPN
listening to.
IP address:

Which protocol do you want for OpenVPN connections?
   1) UDP (recommended)
   2) TCP
Protocol [1-2]: 1

What port do you want OpenVPN listening to?
Port: 1194

Which DNS do you want to use with the VPN?
   1) Current system resolvers
   2) Google
   3) OpenDNS
   4) NTT
   5) Hurricane Electric
   6) Verisign
DNS [1-6]: 1

Finally, tell me your name for the client certificate
Please, use one word only, no special characters
Client name: client1

Okay, that was all I needed. We are ready to setup your OpenVPN server now
Press any key to continue...

It will start to generate new private key that take some times. Once finished, copy or download the .ovpn we created during the installation. This configuration file (.ovpn) will be used for the client to connect to the OpenVPN Server.

Connect Client to OpenVPN

To connect to the OpenVPN Server from Linux (Ubuntu), please refer to this post.

Be the first to comment

Leave a Reply