iptables 端口转发(1)(2)
看一我的规则:
[root@redhat unixboy]# /sbin/iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- 10.0.0.0/24 anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere 10.0.0.2 tcp dpt:http
ACCEPT tcp -- anywhere 10.0.0.2 tcp dpt:ftp
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@redhat unixboy]# /sbin/iptables -L -t nat
Chain PREROUTING (policy DROP)
target prot opt source destination
DNAT tcp -- anywhere 192.168.1.201 tcp dpt:81 to:10.0.0.2:80
DNAT tcp -- anywhere 192.168.1.201 tcp dpt:ftp to:10.0.0.2:21
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.0.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
通过上面的文章描述,我们找到iptables 端口转发的问题,并解决了他!希望对你们有用!
- iptables nat 技术笔记
- iptables+NAT+端口映射
- 如何查看iptables关于nat的日志
- RedHat 9上用iptables做NAT网和记录日志
- iptables下开放ftp连接
- Linux iptables将nat中内网多台ftp服务器映射出去
- Linux Iptables 内核添加time模块
评论暂时关闭