How to install and configure a VPN – OpenVPN

29th Oct 2016 Karibu

logo_openvpnOpenVPN is the most popular VPN service to install on your own server. Afraid about the configuration? Don’t be, we will use the web based OpenVPN Access Server to help us out !


Today, I received my Amazon Echo Dot from US (Import) to play with, and I wanted to configure Amazom Music or Spotify for it. Unfortunately, those 2 services are not available where I live…So I decided to by pass their geographical restrictions by using a VPN.

There are many free or paid services for such use, but for security and privacy reason, I wanted to leverage on one of my dedicated server abroad. Hence I had to install and configure myself the VPN. But it is not that easy to do actually…in most cases, you need quite some configuration. As I was probably impatient, I wanted a faster way to set it up and this is how I found the web based Access Server of OpenVPN that simplify all the configuration.


OpenVPN Access Server let you simply configure, add users, … to your VPN in few clicks. They have a free license, for 2 connections.


Here is how to install your own VPN on Debian style of distributions.


You will obviously need a web server (Apache?) to use it. You probably have it already, so I don’t cover it here.

This is what you need to do on your server:


1) Install OpenVPN and OpenSSL

With root user (or with sudo), run:

apt-get install openvpn openssl
2) Install OpenVPN Access Server

Simply go there to download the Access Server package for your own distribution and install it.

In my case for Debian, it will be:

dpkg -i openvpn-as-2.1.4-Debian8.amd_64.deb

It will create a user openvpn and will ask you to create a password with the command:

passwd openvpn
3) Create a user that will be able to connect to the VPN
adduser uservpn

and add a password.

You should now be able to access the web portal of OpenVPN at https://yourIP:943/admin, with the admin user “openvpn” and the password you have created.



4) Enable the VPN access

Your next step will be to add your created user “uservpn” to the “User Permissions” field. You can tick the “Allow Auto-login” if you want to allow connecting to the VPN without needed to re-enter the password.

Don’t forget to save the settings.


5) Get the client connection detail for your user

Now that you have added your user to your VPN, you need to download its configuration file.

Simply connect to the VPN at https://YourIP:943/?src=connect with your created user (“uservpn”) that will let you download your profile (autologin or user-locked).


In my case, I’m using the autologin to greater ease.

Well and that’s it, now you can connect to your VPN.


6) Connect to the VPN

You can use some addons for Chrome or Firefox for VPN connections, or you could connect directly to the VPN to ensure your full system goes there. If this is the case, you just need to install openvpn on your computer.

apt-get install openvpn

and connect to your VPN with your profile you have just downloaded

openvpn --config client.ovpn

You should now be connected to your VPN and all connections should go through this VPN.


Obviously, running a VPN can be dangerous (3rd party access) so I strongly recommend you to secure your installation and check some of the options in the admin panel of OpenVPN Access Server.


Loves to discover web-based apps to install on his own server@home and write articles about it


Add a comment