阿里云、腾讯云
云主机实现PPTP和NAT功能,Iptable配置如下:
云主机系统Centos 6.8 64bit
不需要增加NAT网和其他云插件
*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
原文地址:http://blog.51cto.com/cvgcv6666/2105879
时间: 2024-10-10 21:43:12