|
|
发表于 2004-7-16 14:39:47
|
显示全部楼层
- GAME_IP=192.168.0.222
- LAN_IP=192.168.0.1
- for INET_IP in 222.222.222.222 333.333.333.333 ; do
- for dport in 80 7000 7100 7200 ; do
- iptables -t nat -A PREROUTING --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
- iptables -t nat -A POSTROUTING --dst $GAME_IP -p tcp --dport $dport -j SNAT --to-source $LAN_IP
- iptables -t nat -A OUTPUT --dst $INET_IP -p tcp --dport $dport -j DNAT --to-destination $GAME_IP
- done
- done
复制代码
output 是针对firewall 本身的 |
|