Running PPTP VPN with CSF firewall

0
81

Most of the time pptp vpn doesnt work with csf firewall. Here is the guide to make it working.

1) type the following command:
nano /etc/csf/csfpre.sh
2) Put the following into the file:
iptables -A INPUT -i venet0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i venet0 -p gre -j ACCEPT
iptables -A OUTPUT -p gre -j ACCEPT
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.84.1.0/24 -j SNAT --to-source ww.xx.yy.zz
iptables -A FORWARD -i ppp+ -o venet0 -j ACCEPT
iptables -A FORWARD -i venet0 -o ppp+ -j ACCEPT
Note: ww.xxy… is your VPS/server ip , 10.84.1.0/24 is the ip you allocated to the pptp

3) Type:
nano /etc/csf/csfpost.sh
4) Put the following there:
service pptpd stop
service pptpd start

Restart your VPS , connect to it and enjoy. Also make sure your 1723 port is open in Csf

Originally posted 2016-02-04 19:40:27.