PPTP VPN Setup – Xen CentOS 5
Note: This tutorial is based on the YardVPS Xen (Tree plan) using CentOS 5
Please select CentOS 5 32bit as your OS when you purchase your YardVPS or rebuild the VPS via SolusVM.


First install the PPTPD VPN and it's dependencies and then update your OS.
yum install ppp iptables vim-enhanced -y
rpm –Uvh http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm
yum update
Edit the following files with vim or whichever editors you prefer.
/etc/ppp/options.pptpd
add a line:
ms-dns 8.8.8.8

/etc/pptpd.conf
add two lines at the bottom of the file.
localip 192.168.216.1
remoteip 192.168.216.2-100

/etc/ppp/chap-secrets
add your vpn clients in this file with this format:
username PPTPD password *
or
username PPTPD password [specified ip address which is in the range of 2-100, the range should be conformed to what’s at the bottom of /etc/pptpd.conf, see above ]

/etc/sysctl.conf
modify:
net.ipv4.ip_forward = 1

Issue the following command:
sysctl –p
iptables -t nat -A POSTROUTING -s 192.168.216.0/24 -o eth0 -j MASQUERADE
/etc/init.d/iptables save
/etc/init.d/pptpd start
chkconfig pptpd on
chkconfig iptables on
Setup PPTPD VPN on Windows client



Enter your VPS IP here:
Enter the username and password in /etc/ppp/chap-secrets

Connect to your PPTP VPN and Cheers!