How to set up OpenVPN in 30 seconds or less on a VPS

After we showed you how to set up a pptp vpn last year we are now addressing how to set up OpenVPN on your server.

From OpenVPN website:

OpenVPN Access Server is a full featured SSL VPN software solution that integrates OpenVPN server capabilities, enterprise management capabilities, simplified OpenVPN Connect UI, and OpenVPN Client software packages that accommodate Windows, MAC, and Linux OS environments. OpenVPN Access Server supports a wide range of configurations, including secure and granular remote access to internal network and/ or private cloud network resources and applications with fine-grained access control.

Last time I did this on an older system, it was quite a painful ride. But hey, if you need a secure connection, that old pptp vpn won't do it anymore. So I dug out that old tutorial I followed a couple years ago and started right away.

After some painful 15 minutes of trying to find out what happened to some packages and what not, I decided to see if a easier method was available.

That's when I stumbled upon a way I could install and run OpenVPN effortlessly.

I first tested this on my home server and it went just fine. But serving the vpn from my home wasn't my purpose. I needed a US based vpn in order to access/download and watch region specific content.

Why RamNode?

After having a great experience with RamNode in the past 6 months, I decided to order a 256mb OpenVZ SSD VPS.
The plan I chose (3 months) was 12.75$ and after using the 30% code discount it went down to 8.80$. That is about 2.94$ a month. Quite affordable for your own dedicated vpn (with an exclusive IP).

By the way, this little VPS maxed out @ 8 Mb/s from US to Europe. Not bad.

Why 32 bit Debian?

Well, I chose a 32 bit installation mainly because I took the time to test both options. After the OS install, only about 9 Mb of memory was used. And after OpenVPN was fully set up, it was using 75-80 Mb of memory (~120 Mb on 64 Bit install) and had 180 Mb free memory.

Here are some screens showing the difference between 32 and 64bit

32 Bit:

64 Bit:

And upon stress testing the connection, 32 Bit Debian could handle much more network bandwidth than the 64 bit version.

Here is a test download, about 30 minutes apart in both systems:

32 Bits Maxed out at 6 Mb/s:

64 Bits maxed out @ 2 Mb/s:

After installing the OS I started setting up the VPN.

How to set up OpenVPN on your VPS

1 - First of all remember to enable TUN/TAP and ppp on your server's control panel.

2 - Then, change your root password, and update your packages:

apt-get update  
apt-get upgrade  

3 - Download OpenVPN Access Server, according to your OS system architecture:

32 bit:

wget http://swupdate.openvpn.org/as/openvpn-as-2.0.17-Debian7.i386.deb  

64 bit:

wget http://swupdate.openvpn.org/as/openvpn-as-2.0.17-Debian7.amd_64.deb  

4 - When you're finished, install it:

32 bit:

dpkg -i openvpn-as-2.0.17-Debian7.i386.deb  

64 bit:

dpkg -i openvpn-as-2.0.17-Debian7.amd_64.deb  

5 - When finished, you should see the link to access your OpenVPN admin panel. Something like this:

https://xxx.xxx.xxx.xxx:943/admin

6 - Before continuing, we need to change the password for the openvpn user. Type:

passwd openvpn  

and choose a new password. You will need this for access to the admin panel.

7 - Next navigate to the link given above for the admin panel, login and accept the license agreement. You should now see your servers status overview page.

If you wish to download the client for your computer, access the link above without "/admin".

And thats it, now you can enjoy a fast and secure connection with OpenVPN and using minimal resources.

If you're running Ubuntu/Fedora/CentOS/OpenSUSE or RedHat, you can find all the links for Access Server HERE