- 论坛徽章:
- 0
|
现在是这样,用以下代码我能转换80端口,可软件说还要一个转换1494端口,我该怎么改?!!!
iptables -t nat -A PREROUTING -d 218.69.10.* -p tcp --dport 80 -j DNAT --to 192.168.2.16
iptables -A FORWARD -o eth0 -d 192.168.2.16 -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -i eth0 -s 192.168.2.16 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -s 192.168.2.16 -p tcp --sport 80 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -o eth0 -d 192.168.2.16 -p tcp --dport 80 -m state --state ESTABLISHED -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.2.16 -d 192.168.0.202 -p tcp -m tcp --dport 80 -j SNAT --to-source 192.168.0.250
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 218.69.10.*
218.69.10.* 外网ip
192.168.2.16 内网ip |
|