Furthermore, you will see that this guide is made for OpenVZ (Virtuozzo) VPSes. Why is this? By their majority openvz (pseudo-virtualization) vps is the cheapest vps that you will find in the market. Why spend $9.99 or even more for a commercial VPN when you can make your own vpn server with $1, $2 or $3 vps. You don’t need ram, cpu or disk space. Any decent vps with 256 RAM is enough for this job. Of course that doesn’t mean you can’t use it on any other server or cloud vps. Just change venet with the right interface on the iptables step below. Typically eth0. So let’s start Setting up PPTP VPN server on CentOS Server.

* If you have iptables service off (chkconfig iptables off) and stopped, you can save those rules in /etc/rc.local. They can start from there in every reboot.

If you’re using a Linux firewall/router in front of the VPS hosting the VPN server, make sure you forward GRE protocol traffic to it: (NO NEED for this in any commercial VPS just homemade if you have issues with your linux router or dd-wrt)

If using a DD-WRT router with a dynamic public IP, the first rule can be replaced withiptables -t nat -I PREROUTING -d `nvram get wan_ipaddr` -p 47 -j DNAT --to $VPS

7. Start PPTP VPN server

Use the following command:service pptpd restart
To set PPTP Daemon to automatically start on boot, run:chkconfig pptpd on

You are ready now. Create a VPN connection from your workstation using your CentOS server IP and test it. A quick and dirty way to test it is to browse to whatismyip.com and check the IP your are browsing from.