How to setup OpenVPN in a Debian 6 VPS

Sometimes, especially with all of the sales, you can gather quite a few extra VPS servers. Especially small ones that aren’t very good for large scale projects. This is why I decided to turn one of my low end VPS servers (that’s redundant, isn’t it…) into an openVPN server that I can use to securely access the Internet. This is especially helpful for on my Android phone when connecting to wireless hot spots. You never know who is looking at your traffic.

So let’s get started!

[sam id=”2″ codes=”true”]

Open VPN is very powerful. It can be customized in many different ways and for the sake of this article we are going to set up a simple and easy to use version of OpenVPN called OpenVPN AS. This will allow you to create user account, limit bandwidth, configure tunneling, and all that good stuff right from a web browser without having to mess with confusing configuration files. The only downside to this is the python server for the web interface takes up a bit more memory than a vanilla, manual configured, OpenVPN server. But it is still completely worth it. I have tested this on a ~320MB OpenVZ VPS and it runs flawlessly. Just make sure your provider enable TUN/TAP for your container. That should only be necessary on OpenVZ. On the other hand, KVM server will allow you to proceed full steam ahead!
First off, I would recommend preforming a clean install of Debian 6 to your VPS through the providers web control panel. It’s not required but just in case there are some left over packages from your previous projects, it should clean up them up.

Now we are ready to grab the packages we need!

Use wget to grab a copy of openVPN.

For 32 bit: wget
For 64 bit: wget

Now let’s install this package!

For 32 bit: dpkg -i openvpn-as-1.8.4-Ubuntu10.i386.deb

For 64 bit: dpkg -i openvpn-as-1.8.4-Ubuntu10.amd_64.deb

Set a password for OpenVPN by running the following:

passwd openvpn

Navigate to the web interface for OpenVPN by going to the following address in a web browser. Be sure to insert the IP address of your VPS.


Log in using the username: openvpn and the password we set earlier.

That’s it! You are all set up! You can go ahead and add users or download the client for your computer. (You can download the client from https://IP-ADDRESS:943)
Questions? Run into any problems? Ask in the comments! We’re more than happy to help!