安装 pptp:
[code] yum -y install ppp pptpd[/code]配置pptpd:
[code]vi /etc/pptpd.conf
localip 192.168.100.100
remoteip 192.168.100.101-110
vi /etc/ppp/options.pptpd
ms-dns 8.8.8.8
ms-dns 8.8.4.4
vi /etc/ppp/chap-secrets[/code]
配置内核转发:
[code]vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl -p[/code]
pptpd 开机启动:
[code]/bin/systemctl start pptpd.service
systemctl enable pptpd.service[/code]安装iptables 并添加规则:
[code] yum install iptables-services -y
iptables -t nat -A POSTROUTING -s 192.1.100.0/24 -j SNAT --to-source 58.33.244.126
iptables -A FORWARD -p tcp --syn -s 192.1.100.0/255.255.255.0 -j TCPMSS --set-mss 1356
service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK
systemctl enable iptables[/code]