本机ip 192.168.1.20
后端上网snat 集群 192.168.0.0/24
放行forward
iptables -I FORWARD 1 -s 192.168.0.0/24 -j ACCEPT #允许所有源地在192.168.0.0/24的ip经过本机
iptables -I FORWARD 1 -d 192.168.0.0/24 -j ACCEPT #允许所有目标地址为192.168.0.0/24的ip地址经过本机
iptables -t nat -I PORTrOUTING -s 192.168.0.0/24 -j SNAT --to-source 192.168.1.20 #为内网提供访问公网的地址转换