关于pptp如何搭建,请参见:https://blog.ahamu.cn/blog/detail.html?id=96
1、iptables -I INPUT -p 47 -j ACCEPT
2、iptables -I INPUT -p tcp --dport 1723 -j ACCEPT
3、iptables -t nat -A POSTROUTING -s 192.168.0.234/24 -o eth1 -j SNAT --to 47.89.xx.xx
注:①-s后面的ip是你的 /etc/pptpd.conf 中remoteip 192.168.0.234-238,192.168.0.245 第一个ip
②-o 是的网卡地址,可以用 route | grep default | awk '{print $NF}' 命令来查看
③--to跟的是你的对外的网络地址
4、lsmod | grep pptp查看有没有pptp的模块,没有的话用 modprobe ip_nat_pptp 命令加载模块
基于以上命令,Leo是搞定了自己的服务器,你呢?搞定了么?