1. Verify that the kernel is loaded with the MPPE module:
Modprobe ppp-compress-18 && Echo MPPE is OK2, installation required packages: Yum-y Install Pppwget ftp://rpmfind.net/linux/epel/7/x86_ 64/P/PPTPD-1.4.0-2.EL7.X86_64.RPMRPM-IVH PPTPD-1.4.0-2.EL7.X86_64.RPM3, configuring PPP and PPTP configuration files: grep ^[^#]/etc/ppp/ Options.pptpdvi/etc/ppp/options.pptpd
| Name Pptpd#refuse-pap#refuse-chap#refuse-mschaprequire-mschap-v2require-mppe-128ms-dns 8.8.8.8ms-dns 8.8.4.4proxyarplocknobsdcompnovjnovjccompnologfd |
Vi/etc/ppp/chap-secrets
Vi/etc/pptpd.conf
| Option/etc/ppp/options.pptpdlogwtmplocalip 192.168.0.1remoteip 192.168.0.207-217 |
4, open the core IP forwarding function: vi/etc/sysctl.conf
/SBIN/SYSCTL-P5, configuring firewalls and NAT forwarding Yum install iptables-servicessystemctl stop firewalld.servicesystemctl Disable Firewalld.servicesystemctl Enable Iptables.servicesystemctl Start iptables.service turn on packet forwarding: Iptables-t nat-a Postrouting-s 192.168.0.0/24-o eno16777736-j masqueradeservice iptables saveservice iptables Restart open port and GRE protocol: IPTABLES-A input-p tcp-m State--state new,related,established-m TCP--dport 1723-j acceptiptables -A input-p gre-m state--state new,related,established-j acceptiptables-t nat-a postrouting-s 192.168.0.0/24-o eno1 6777736-j Masquerade Add rule: iptables-a input-p gre-j acceptiptables-a input-p tcp-m tcp--dport 1723-j ACCEPTiptables -A input-m state--state related,established-j acceptiptables-a forward-s 192.168.0.0/24-o eno16777736 -j Acceptiptables-a forward-d 192.168.0.0/24-i eno16777736 -j acceptiptables-t nat-a postrouting-s 192.168.0. 0/24-o eno16777736 -j Masqueradeservice iptables Save startup and viewing services: SYSTemctl start Pptpdsystemctl enable Pptpdsystemctl status Pptpd6. View PPTPD Service processes and Ports: #ps-ef | grep pptpdroot 25100 1 0 14:19? 00:00:00/usr/sbin/pptpd-froot 25463 24275 0 14:52 pts/0 00:00:00 grep--color=auto pptpd# Netstat-nutap | grep pptpdtcp 0 0 0.0.0.0:1723 0.0.0.0:* listen 25100/pptpd
Configuring the PPTP server