Easiest Way To Build VPN Server with PPTP

What you need?

  1. A VPS or Dedicated server running CentOS 6.x
  2. Proper knowledge to use PuttySSH and common Unix command
  3. Only for VPS based-on OpenVZ virtualization (other skip this): please enable TUN/TAPand PPP options in your VPS control panel (e.g: SolusVM).

OpenVZ VPS user only:

enable tun tap ppp

How To Install PPTP VPN on CentOS 6.x

Step 0 – Login to your server via SSH. You better login as root.

Step 1 – Now issue this first command syntax:

example:

yum install -y git

 

install git

Step 2 – Now also type this command and hit Enter

cd /opt && git clone git://github.com/drewsymo/VPN.git

example:

Step 3 – The final command, issue this and wait (the output a little bit long):

example:

cd VPN && bash vpn-setup-vanilla.sh

 

last command to install pptp vpn

That’s it. Now your brand new VPN server is ready to use. You’ll see default username and password at the end of the installation:

install pptp vpn ready

Now you can test it on your iPhone,iPad and Android devices.

NOTE for OpenVZ-based VPS:

You have to also issue this last command:

iptables -t nat -A POSTROUTING -j SNAT --to-source x.x.x.x

Please replace x.x.x.x with your venet0 IP address.

Conclusion

Building a VPN server using CentOS can never be easier than above method. I tested this script in a Cloud server hosted by DigitalOcean which I don’t know what virtualization technology used but it works like charm. For you guys who simply need a free PPTP VPN server that really works (and fast) to use in your iPhone, iPad, iPod or any Android devices, you can visit VPNADAY.COM. There you can get free VPN with no registration.