How To Set Up Your Own VPN via a VPS

Posted on Apr 4 2017 - 2:54am by TekGuru

Image result for Open VPNBecause your internet privacy is a valuable thing, valuable enough that if you live in the United States senators passed a law allowing for ISPs to sell it without your consent; I have decided to make this tutorial.  Now whom else can benefit from this?  For those of you that want to know how host and setup your own VPN, for those who don’t trust paying a VPN service to keep your personal info secret, for those that want to use Netflix through a VPN and the list can go on. But if you ever wanted to have your own VPN via a VPS then you are at the right place.

Before I start this tutorial I want to address two things: 1) What a VPS is and 2) How to chose a VPS

1.) A Virtual Private Server (VPS) is more or less exactly what it sounds like – you rent some of the resources on a physical server run by a VPS company, which provides a closed environment that acts as if it was a complete physical remote server. You can install any operating system on a VPS (as long as the provider allows it), and basically treat the VPS as your own personal remote server.

2.) Choosing the right VPS can be tricky. You want to make sure it is out of the reach of a Five, Nine, or Fourteen eyes country. And here is what each of those is

Five Eyes Country

The 5 eyes countries are the foundation of this network. They are derived from the UKUSA Agreement, which is essentially an agreement to collect, analyze, and share intelligence between these five countries. And though they have agreed not to spy on each other as enemies, they often spy on each other so that a particular country is not caught red-handed. For example, if it is against the law for the U.S government to spy on its own citizens, they might ask the U.K government to do that for them. Here are the 5 eyes:

USA, UK, Canada, Australia, and New Zealand


Nine Eyes Country

Nine Eyes  Countries are basically four more countries that joined the four eyes countries. They are:

Denmark, France, Holland, and Norway



Fourteen Eyes Country

Are the Nine Eyes Countries plus four more (getting the pattern here). These countries are:


Germany, Belgium, Sweden, and Spain


The country I would personally would get a VPS host out of is Hong Kong, but that is just a personal preference.



Advantages of VPN on a VPS

  • Acts as a proxy server, so great for accessing geo-restricted services as long the VPS is located in the country you wish to access the services from.
  • The VPS provides a private IP address, so the IP address will not be blocked by services such as Hulu, Netflix, or by most firewalls.
  • All traffic between your computer and the VPS goes through an encrypted VPN tunnel. As long as the VPS is located outside your country of origin’s influence.


  • Because the VPS provides a static IP address that belongs to you, a global adversary (such as the NSA or police forces with an international reach) can easily trace internet activity back to you
  • Not suitable for copyright piracy – copyright holders will send DMCA notices (and similar) to your VPS provider. Which can take your VPN offline, especially if it breaks their T.O.S


Installing OpenVPN Access Server on the VPS

1. Open your SSH client (FileZillla should work for this)and connect to your VPS server using the login credentials supplied by your VPS provider.

2. Login as root and enter the password you were given by your VPS provider.

3. Before going any further  check that tap/tun is enabled. Enter cat /dev/net/tun 

If tap/tun is enabled you should see the following line : cat: /dev/net/tun: File descriptor in bad state

Anything else and you will have to enable tap/tun

4. Download the OpenVPN Server Access package.

5. Configure OpenVPN for CentOs7 or CentOs6.

This part is where you will need to save  your admin UI address and Client UI address ( admin UI to configure your VPN, Client UI to connect to it).

6. Setup a password by using the command line passwd openvpn. This can be whatever you want, you can make it something easy and always change it later if you wish.

7. Paste the Admin UI address into your web browser (the one you should have gotten from step 5), and enter Username: ‘openvpn’ and whatever password you selected into the Admin Login.

8. You should now see the OpenVPN Access Server configuration page.

9. Now type in your Client UI address in the address bar of your browser. From here you can download the Open VPN client

10. Just log in using your user name and password and connect to it. That’s it really, you are now done. Start enjoying your newly created VPN!




About the Author

I love anything that is tech related, gaming, science, movies ect. I am the owner and founder of AllThatTek.

Leave A Response