Setup pptp service on ubuntu

1.Istall PPTPd

sudo apt-get install pptpd

sudo nano /etc/pptpd.conf

delete # of:localip 192.168.0.1 remoteip 192.168.0.234-238,192.168.0.245

2. Add Acount &change DNS

sudo nano /etc/ppp/chap-secrets

add :username  pptpd  "password"  *

sudo nano /etc/ppp/pptpd-options

delete # of ms-dns,change into 114.114.114.114,8.8.8.8,8.8.4.4

sudo nano /etc/sysctl.conf

delete # of  net.ipv4.ip_forward=1

sudo sysctl -p

3.Install iptables

sudo apt-get install iptables
sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

4.restart service

sudo service pptpd restart

5.Change rules

/sbin/iptables -I FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356

Leave a Reply

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