CentOS-install-pptp-server

yum install epel-release -y
yum update -y
yum install pptpd -y

systemctl start pptpd
systemctl enable pptpd

vim /etc/pptpd.conf
localip 192.168.40.1
remoteip 192.168.40.100-238,192.168.40.245

vim /etc/ppp/chap-secrets
test * test *

firewall-cmd --add-port=1723/tcp
firewall-cmd --add-masquerade
firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -i ens4 -p gre -j ACCEPT
firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -p tcp -i ppp+ -j TCPMSS --syn --set-mss 1356

firewall-cmd --permanent --add-port=1723/tcp
firewall-cmd --permanent --add-masquerade
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -i ens4 -p gre -j ACCEPT
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -p tcp -i ppp+ -j TCPMSS --syn --set-mss 1356


#参考文章:http://henry.gffu.net/470