-
-
Save changbinwang/8020883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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