Khoa Vo

A virtual private network, also known as a VPN, is a private network that extends across a public network or internet. It enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. There are many questions about VPN and I am going to answer you the best I can.

Install OpenVPN On A Virtual Private Server

Install OpenVPN On A Virtual Private Server

What can you do with VPN? A VPN server will surf the web on your behalf and replace your current IP Address with the VPN server’s IP address. Therefore, you can access the content exclusively for a certain region, given that your VPN server is in the same region. For example, streaming video from Netflix, streaming audio from Pandora, etc. Those services think you are in the same region but you are not.

Why do I need to run my own VPN server instead of purchasing a VPN service somewhere on the internet? There are multiple VPN services available for purchase on the internet. However, you are not in control. First, they may log everything you surf on the web, including personal and billing information. Second, you share bandwidth with many people and the speed is not that great.

Running your own VPN server, you will be in control of what you do and the bandwidth (usually 1 Gigabit port) is all for you. In fact, it is much cheaper to run your own VPN server. Ramnode is offering 128MB RAM OpenVZ Virtual Private Server for only 15 USD / year. and with the coupon SSD10 you get a lifetime 10% off discount. So, the total cost is just about 13.5 USD per year. This is much cheaper and faster speed than a VPN Service.

In this article, I will show you how to setup your own VPN Server the easy way

Step 1: Purchase the smallest VPS (virtual private server). You can buy from Ramnode or somewhere else you like. Be sure to choose CentOS as Operating System Template and remember the root password you have set. After you got all the information they sent to email, proceed to step 2.

Step 2: First, we need log in SolusVM Control Panel in order to enable VPN protocols. In Settings Tab, turn on PPP protocol. Restart your server. Proceed to step 3.

Step 3: Using PUTTY tool, type in your hostname or the provided server IP address and click connect. You will be prompt the login. Enter username as “root” and password as the root password you set in Step 1 when you purchased the VPS.


# login as: root
#’s password:
Last login: Mon Sep 12 23:23:53 2016 from
[root@cdn ~]#

Step 3: We enter the following commands to update the server first and then install OpenVPN


# yum update

(say y – yes to everything asked)


# yum install net-tools

(install the net-tools package needed for OpenVPN)


# wget

(download OpenVPN access server package. You can get the latest here. You can copy the link and replace the link above)


# rpm –ivh openvpn-as-2.1.2-CentOS7.x86_64.rpm

(run rpm package to install)

You will get this result:


Please enter “passwd openvpn” to set the initial
administrative password, then login as “openvpn” to continue
configuration here:
To reconfigure manually, use the /usr/local/openvpn_as/bin/ovpninit tool.

Access Server web UIs are available here:
Admin UI:
Client UI:’

Next, we set openvpn password so that we can connect to VPN Server later


# passwd openvpn



Changing password for user openvpn.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Step 4: we use Admin UI URL and put in a browser to open admin page. Note: you can change IP number to your server hostname (domain name you set when purchased the VPS). For example: instead of

Login using username openvpn and password set earlier. Accept the TOS Warning. You should see message VPN server is on and running. Next, we set the hostname for VPN server instead of IP Address. It is easier to remember than remembering the numbers. Click on “Server Network Settings” on the left sidebar, in the field “Hostname or IP Address”, replace the IP Address with your hostname (for example in my case I type in Then, click on “Save Settings” button and “Update Running Server” button. All Done! You have set up your own VPN Server. In the next article, I will show you how to use your newly set up VPN server.

Filed under: Featured, Linux, Tutorials, VPS


  1. Reply
    […] can do with a VPS Hosting: (1) Host websites and web apps (2) Run desktop and command line apps (3) Set up VPN server (4) Store, Share, & Transfer Files (5) Stream Videos, and other […]
How to connect to your own OpenVPN Server
Loading Content