+ -
当前位置:首页 → 问答吧 → Centos5.4升级内核之后iptables问题???

Centos5.4升级内核之后iptables问题???

时间:2010-08-27

来源:互联网

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

作者: shineblade   发布时间: 2010-08-27

这是为什么呢??内核编译完成后ip_tables和iptable_filter这些模块怎么不会自动挂载??为啥iptables 启动不起来???大家有没遇到这个问题!!!俺的环境是在VMware7.0编译的!!!!

作者: shineblade   发布时间: 2010-08-27