LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1793|回复: 15

哪位兄弟在gentoo下安装iptables了,请帮助

[复制链接]
发表于 2007-3-26 17:47:09 | 显示全部楼层 |阅读模式
emerge iptables

iptables -L -nv 提示无法找到filter模块,于是

进入/usr/src/linux(由于以前编译过,所以先make mrproper)
make menuconfig
把networking-support
    networking-options
    把下面的所有选项都搞成了M

....................
然后make && make modules_install
depmod -a

ls /lib/modules/$(uname -a)/kernel/net/ipv4/netfiler都可以看到编译好的模块
然后modproble ip_tables的时候提示错误
FTTAL: error inserting ip_tables ( /lib/modules/$(uname -a)/kernel/net/ipv4/netfiler) : Invalid module format


为什么会这样,帮忙......
发表于 2007-3-26 18:20:58 | 显示全部楼层
iptable 需要内核支持的。wiki上有很详细的文档。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-26 20:35:21 | 显示全部楼层
Post by sheep204
iptable 需要内核支持的。wiki上有很详细的文档。

恩,我就是按照wiki上写的
http://gentoo-wiki.com/HOWTO_Iptables_for_newbies
但是.....
回复 支持 反对

使用道具 举报

发表于 2007-3-26 23:51:50 | 显示全部楼层
你要用新内核启动,然后再modprobe,你新编译的模块和你目前运行的内核可能不匹配
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-27 09:11:18 | 显示全部楼层
Post by zhllg
你要用新内核启动,然后再modprobe,你新编译的模块和你目前运行的内核可能不匹配

zhllg斑竹

因为我只是编译的modules,也就是说给kernel加了几个模块而已.并没有编译bzimage,现在是可以启动的.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-27 09:38:34 | 显示全部楼层
tail -f /var/log/messages
Mar 26 21:30:32 localhost ip_tables: version magic '2.6.20-gentoo-r1' SMP mod_unload PENTIUMIII' should be '2.6.20-gentoo-r1' SMP mod_unload 686 4KSTACKS'

处理器的型号不同??
回复 支持 反对

使用道具 举报

发表于 2007-3-27 19:43:23 | 显示全部楼层
the mismatch is not just about the kernel source, but also about the config of kernel.
the config of the currently running kernel is different from the config of the module you've just compiled. the former is configured as 686 cpu and 4k kernel stack, however the latter is configured as pentium 3.
as I said, you have to reboot to use the newly compiled kernel. the kernel and the modules should match.
回复 支持 反对

使用道具 举报

发表于 2007-3-27 20:12:08 | 显示全部楼层
…………版主英文好好哦。
回复 支持 反对

使用道具 举报

发表于 2007-3-29 04:19:41 | 显示全部楼层
恩,恩 zhllg版主都牛的,咋学的?
回复 支持 反对

使用道具 举报

发表于 2007-3-29 11:04:57 | 显示全部楼层
用 genkernel 编译的可以这样:
genkernel menuconfig all
然后选上iptable 相关模块,
再emerge 一次iptables 。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表