阿里云、腾讯云
云主机实现PPTP和NAT功能,Iptable配置如下:
云主机系统Centos 6.8 64bit
不需要增加NAT网和其他云插件

/etc/pptp.conf文件修改:
localip 172.17.0.2 #这是云主机内网地址
remoteip 172.17.0.10-100 #这是给客户端拨号预分配的IP地址范围,需与云主机内网地址在同一网段内
#logwtmp 如果报日志错,需注释掉,否则可以不注释

/etc/ppp/options.pptpd文件修改:
ms-dns 114.114.114.114

/etc/sysconfig/iptables文件修改:
*filter
:INPUT ACCEPT [394:32816]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [387:33334]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

-A INPUT -p icmp -j ACCEPT
-A INPUT -p tcp --dport 22 -j ACCEPT
-A INPUT -p tcp --dport 1723 -j ACCEPT
-A INPUT -p gre -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356
-A FORWARD -p gre -j ACCEPT
#-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p gre -j ACCEPT
COMMIT

*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 172.16.145.0/24 -o eth0 -j MASQUERADE
COMMIT

将iptables和pptpd设置为开机启动:
chkconfig iptables on
chkconfig pptpd on