Redhat/CentOS 5 Linux PPTP VPN Setup

1. Install the Yum Repository for PPTP

rpm -Uvh

2. Then proceed with installing ppp & pptpd

yum install ppp
yum –enablerepo=pptp-stable install pptp

On newer CentOS distributions, ppp is already installed and at 2.4.4 or later, as of this writing pptpd needs 2.4.3 , so you may need to remove ppp and have yum install it automatically as a dependancy of pptpd

3. After installation finnish open /etc/pptpd.conf and change the configuration for localip & remoteip


4. After that open the file / etc / ppp / options.pptpd and change sesuia ms-dns dns server / isp you (I filled in with open dns ip)


5. Then make your VPN use

echo “username pptpd password *”>> / etc / ppp / chap-secrets

IP Forwarding & Nat
1. Set IPForward

edit /etc/sysctl.conf and update

net.ipv4.ip_forward = 1

Then run `sysctl -p` to make the system update itself with the above param.

2. Set Nat

Add the following to /etc/sysconfig/iptables to add a new nat chain/rule

:PREROUTING ACCEPT [5476825:840006712]
:POSTROUTING ACCEPT [11279:680432]
:OUTPUT ACCEPT [10099:609991]

Leave a Reply

Your email address will not be published. Required fields are marked *