1、验证内核是否加载了MPPE模块:
modprobe ppp-compress-18 && echo MPPE is ok
2、安装所需的软件包:
yum -y install ppp
wget ftp://rpmfind.net/linux/epel/7/x86_64/p/pptpd-1.4.0-2.el7.x86_64.rpm
rpm -ivh pptpd-1.4.0-2.el7.x86_64.rpm
3、配置PPP和PPTP的配置文件:
grep ^[^#] /etc/ppp/options.pptpd
vi /etc/ppp/options.pptpd
name pptpd #refuse-pap #refuse-chap #refuse-mschap require-mschap-v2 require-mppe-128 ms-dns 8.8.8.8 ms-dns 8.8.4.4 proxyarp lock nobsdcomp novj novjccomp nologfd
vi /etc/ppp/chap-secrets
username pptpd passwd *
vi /etc/pptpd.conf
option /etc/ppp/options.pptpd logwtmp localip 192.168.0.1 remoteip 192.168.0.207-217
4、打开内核的IP转发功能:
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
/sbin/sysctl -p
5、配置防火墙和NAT转发
yum install iptables-services systemctl stop firewalld.service s