This tutorial is intended to help you on how to run OpenVPN AS on Debian 6 OS.

Open VPN logo

It took me a net of 2 weeks to finally make run OpenVPN in a Server with Debian as an OS. Setting up your own VPN Client is easy. All you need is a cheap VPS, and type in few commands. That’s it. Screw the blockades set up by your Institute’s internet. You can browse through any sites you want to, as well as unblock P2P, FTP etc. This tutorial is for installing OpenVPN, and how to fix the errors that you might face subsequently. Hell yes, I did. Took me a few days to figure them out, and get them to work. And Now I am browsing from USA. 8)

Requirements:

- A VPS  (https://en.wikipedia.org/wiki/Virtual_private_server)

- Putty

- Debian 6

 

Step- I : Selecting a VPS

Look for a cheap one, and that runs on Xen Virtualisation Platform, rather than OpenVZ. You can get an OpenVZ Vps too. I myself am running the VPN server on a VPS based on OpenVZ. But after suffering plenty of problems with TUN/TAP, and Iptables.

The choice shall include the first parameter, on how much maximum speed do you get on  your internet connection. For example, while in LAN, I can get as most as 30Mbps in my institute’s internet, while in Wifi I can get upto 2-3 Mbps. Remember I am talking on bytes. Since I use mostly wifi, so 100mbit server shall suffice. (100mbit means, the maximum speed you can get shall be near to 10Mbps)

(Anything with a disk space of 20GB, 512MB ram, 500GB Bandwidth ( BW depends on your usage))

Step- II: Enabling TUN/TAP

Since you have now bought a vps, you should have access to a Solus VM Control Panel. You need to enable TUN/TAP here. Login to the Panel, in the down there should be many tabs. Go to the Settings Tab, Click on Enable TUN/TAP.

Tun Tap Solus VM

TUN TAP

More information on TUN/TAP:  http://en.wikipedia.org/wiki/TUN/TAP

Now reboot your server. (General Tab > Reboot)

Step- III : Using Putty to install OpenVPN

 

Download Putty from here - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Run it, login to your VPS as root user.

Run the following commands first -

apt-get update

Then

apt-get upgrade

This should install all the latest updates for your OS requiredto run OpenVPN.

Now to Install OpenVPN:

If on Debian 6 32 Bit
wget http://swupdate.openvpn.org/as/openvpn-as-1.8.5-Debian6.i386.deb

If on Debian 6 64 Bit

wget http://swupdate.openvpn.org/as/openvpn-as-1.8.5-Debian6.amd_64.deb

To Install it, run the following command

For 32 Bit

dpkg -i openvpn-as-1.8.5-Debian6.i386.deb

For 64 Bit

dpkg -i openvpn-as-1.8.5-Debian6.amd_64.deb

Step- IV : Setting up a new password

Congratulations, you have installed OpenVPN AS successfully. Now go to the admin.

Before that, do the following.

Run the following in Putty terminal

passwd openvpn

Enter the password you want for Openvpn there.

Now Go to https://xxx.xxx.xxx.xx:943/admin/ (Replace xxx.xxx.xxx.xx with your server ip)

Use the following : User- openvpn
Password- the password you just set in Putty

Click on Start VPN server.

Go to https://xxx.xxx.xxx.xx:943/

Login with your credentials, download the Open VPN Client, and enjoy.

Step- V : Fixing Iptables Error

I was stuck with this error for quite a while.

Error:

 iptables service not started because of error (SVC_RUN_EXCEPT)

iptables error  openvpn

iptables error openvpn

 

Don’t get tensed, this is not your fault. Simply make a support ticket. Ask the hosting guys to enable Iptables and follow the tutorial here http://openvpn.net/index.php/access-server/docs/admin-guides/186-how-to-run-access-server-on-a-vps-container.html

Once they enable the Iptables, go to your panel, Re- Enable TUN/TAP. That should fix the error. This is the ultimate fix for that error. Enjoy! :)

Happy Secure Browsing.!