- 论坛徽章:
- 0
|
转发不成功,请看规则。
是访问题61.185.207.246的5555端口时转发到192.168.0.2的22端口上等。
下面是各个表的输出内容。
[root@xfpower etc]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere smtp.xfpower.com tcp dpt:5555 to:192.168.0.250
DNAT tcp -- anywhere dns.xfpower.com tcp dpt:5556 to:192.168.0.2
DNAT tcp -- anywhere smtp.xfpower.com tcp dpt:telnet to:192.168.0.8
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT tcp -- 192.168.0.250 anywhere tcp spt:ssh to:61.185.207.246:5555
SNAT tcp -- 192.168.0.2 anywhere tcp spt:ssh to:61.185.207.246:5556
SNAT tcp -- 192.168.0.8 anywhere to:61.185.207.246:23
MASQUERADE all -- 192.168.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@xfpower etc]# iptables -t filter -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 127.0.0.2 anywhere
DROP all -- 127.0.0.2 anywhere
DROP all -- 172.16.0.0/12 anywhere
DROP all -- 10.0.0.0/8 anywhere
DROP all -- 192.168.0.166 anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 192.168.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@xfpower etc]# iptables -t mangle -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
看看出了什么误。 |
|