免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: xuanhan863
打印 上一主题 下一主题

[网络管理] iptables: No chain/target/match by that name. [复制链接]

论坛徽章:
0
1 [报告]
发表于 2012-01-15 22:55 |显示全部楼层
iptables --version
iptables -t nat -L
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.0.1
看看哪一步的时候出错。

论坛徽章:
0
2 [报告]
发表于 2012-01-16 21:33 |显示全部楼层
那有可能是你的“-j REDIRECT --to-port 7000”出问题了。
这个我没有用过,你再好好看看。

论坛徽章:
0
3 [报告]
发表于 2012-01-16 21:43 |显示全部楼层
[root@CentOS6 ~]# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
[root@CentOS6 ~]# iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 7000
[root@CentOS6 ~]# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80 redir ports 7000

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
[root@CentOS6 ~]#

我的木有问题,我的内核是3.0的,iptables是1.4.12

论坛徽章:
0
4 [报告]
发表于 2012-01-17 11:08 |显示全部楼层
有没有可能是你编译内核的时候,Netfilter有的项没有选?

论坛徽章:
0
5 [报告]
发表于 2012-01-17 19:44 |显示全部楼层
本帖最后由 marsaber 于 2012-01-17 19:47 编辑

我记得我那个Netfilter是全选的,能模块的就模块,不能模块的就编入内核。
还有,不要可能、也许、差不多、应该,太含糊了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP