Configure PPTP VPN Server on Ubuntu Xenial

在Ubuntu Xenial 16.04 上配置PPTP VPN服务器

sudo apt-get install pptpd

vi /etc/pptpd.conf

localip 192.168.0.1-10

remoteip 192.168.0.101-110

vi /etc/ppp/pptpd-options

ms-dns 8.8.8.8

ms-dns 8.8.4.4

vi /etc/ppp/chap-secrets

username * passwd *

vi /etc/sysctl.conf

net.ipv4.ip_forward=1

sysctl -p

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

iptables-save > /etc/iptables-rules

vi /etc/network/interfaces

pre-up iptables-restore < /etc/iptables-rules

或者直接把iptables命令写入rc.local