Skip to content

Instantly share code, notes, and snippets.

@changbinwang
Forked from infate/ubuntu pptpd setup
Created December 18, 2013 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save changbinwang/8020883 to your computer and use it in GitHub Desktop.
Save changbinwang/8020883 to your computer and use it in GitHub Desktop.
1.
sudo apt-get install pptpd
2.修改/etc/pptpd.conf
option /etc/ppp/pptpd-options
logwtmp
localip 192.168.0.1
remoteip 192.168.0.2-3
3.修改/etc/ppp/pptpd-options
name servername
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 140.121.80.16
proxyarp
nodefaultroute
lock
nobsdcomp
4.修改/etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
username servername passwd *
5.
sudo /etc/init.d/pptpd restart
or
sudo service pptpd restart
6.修改/etc/sysctl.conf
find "#net.ipv4.ip_forward=1" in file then delete #
7.
sudo sysctl -p
8.
sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADE
add "iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADE" to /etc/rc.local file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment