Configure PPTP VPN Server

  1. Install ppp

yum install ppp

  1. Download pptpd rpm

wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.i686.rpm

  1. Set the local and remote ip in /etc/pptpd.conf

vi /etc/pptpd.conf

localip <local ip address of server>

remoteip < range of ip addresses to be assigned to users, eg. 192.168.100.1 - 254>

  1. Set the authentication mode, encryption and DNS settings to /etc/ppp/options.pptpd

vi /etc/ppp/options.pptpd

require-mschap-v2

require-mppe-128

ms-dns

  1. Create user accounts in /etc/ppp/chap-secrets

vi /etc/ppp/chap-secrets

pptpd

  1. Enable ip forwarding

vi /etc/syscctl.conf

net.ipv4.ip_forward = 1

  1. Apply changes

sysctl -p

  1. Configure Nat in iptables

iptables -t nat -A POSTROUTING  -o eth0 -j MASQUERADE

  1. Restart iptables

service iptables save

service iptables restart

10.  Start pptpd and set to auto start on reboots

chkconfig pptpd on

service pttpd start