免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5249 | 回复: 4
打印 上一主题 下一主题

Centos5.4升级内核之后iptables问题??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-08-27 21:22 |只看该作者 |倒序浏览
CentOS5.4内核升级到2.6.35之后 iptables就启动不起来了!!
[root@cent0S ~]# service iptables start
Unloading iptables modules: [  OK  ]
Applying iptables firewall rules: iptables-restore v1.3.5: iptables-restore: unable to initializetable 'filter'

Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]

在运行

[root@cent0S ~]# iptables -L -t filter
iptables v1.3.5: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

查看lsmod
发现没有


[root@cent0S ~]# lsmod | more
Module                  Size  Used by
ip_tables               8217  0
autofs4                17734  3
lockd                  53865  0
sunrpc                161379  2 lockd
ip6_tables              9392  0
x_tables               13150  2 ip_tables,ip6_tables
dm_mirror              10142  0
dm_multipath           12543  0



然后用modprobe挂载
[root@cent0S ~]# modprobe ip_tables
[root@cent0S ~]# modprobe iptable_filter
[root@cent0S ~]# iptables -L -t filter
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

之后就可以显示

但是问题又来了
[root@cent0S ~]# service iptables start
Flushing firewall rules: [  OK  ]
Setting chains to policy ACCEPT: filter [  OK  ]
Unloading iptables modules: [  OK  ]
Applying iptables firewall rules: iptables-restore v1.3.5: iptables-restore: unable to initializetable 'filter'

Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]

还是一样启不来!!!!
看了下表
[root@cent0S ~]# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.3.5 on Sun Aug 22 01:08:36 2010
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
# Completed on Sun Aug 22 01:08:36 2010

论坛徽章:
0
2 [报告]
发表于 2010-08-27 21:24 |只看该作者
这是为什么呢??内核编译完成后ip_tables和iptable_filter这些模块怎么不会自动挂载??为啥iptables 启动不起来???大家有没遇到这个问题!!!俺的环境是在VMware7.0编译的!!!!

论坛徽章:
36
IT运维版块每日发帖之星
日期:2016-04-10 06:20:00IT运维版块每日发帖之星
日期:2016-04-16 06:20:0015-16赛季CBA联赛之广东
日期:2016-04-16 19:59:32IT运维版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-19 06:20:00每日论坛发贴之星
日期:2016-04-19 06:20:00IT运维版块每日发帖之星
日期:2016-04-25 06:20:00IT运维版块每日发帖之星
日期:2016-05-06 06:20:00IT运维版块每日发帖之星
日期:2016-05-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-13 06:20:00IT运维版块每日发帖之星
日期:2016-05-28 06:20:00每日论坛发贴之星
日期:2016-05-28 06:20:00
3 [报告]
发表于 2010-08-28 22:04 |只看该作者
[root@cent0S ~]# iptables -L -t filter
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

之后就可以显示


既然可以这样了,那么直接添加一条规则试试

论坛徽章:
0
4 [报告]
发表于 2010-08-30 02:34 |只看该作者
[root@cent0S ~]# iptables -L -t filter
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
[root@cent0S ~]# /etc/init.d/iptables restart
Flushing firewall rules: [  OK  ]
Setting chains to policy ACCEPT: filter [  OK  ]
Unloading iptables modules: [  OK  ]
Applying iptables firewall rules: iptables-restore v1.3.5: iptables-restore: unable to initializetable 'filter'

Error occurred at line: 2
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]
[root@cent0S ~]#

论坛徽章:
0
5 [报告]
发表于 2010-08-30 02:36 |只看该作者
可惜的是能加 但不能启动 已启动还是这个问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP