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
Step 2. Download OpenVPN install script
wget https://git.io/vpn -O openvpn-install.sh
chmod +x openvpn-install.sh
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
IP address: 10.34.0.247
Which protocol do you want for OpenVPN connections?
1) UDP (recommended)
Protocol [1-2]: 1
What port do you want OpenVPN listening to?
Which DNS do you want to use with the VPN?
1) Current system resolvers
5) Hurricane Electric
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...
Connect Client to OpenVPN
To connect to the OpenVPN Server from Linux (Ubuntu), please refer to this post.