IPTABLES issue
Ok, so what I have (on a different server from the other one I've got a problem with) is a situation where I get the following message from iptables:
iptables v1.4.12.1: can't initialize iptables table `nat': iptables who? (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. I've emerge --unmerge and re-emerged Iptables, but cannot understand why this is throwing this issue - I've enabled Netfilter and associated bits in the menuconfig. what have I missed out on or messed up on? TIA |
It is a kernel configuration problem.
Is the nat module built-in? grep your kernel config for NF_NAT |
Hi andrewthomas
I thought I'd switched it on, but I could be wrong on this one. This is what I got back from a grep of my kernel config CONFIG_NF_NAT=m CONFIG_NF_NAT_NEEDED=y CONFIG_NF_NAT_PROTO_GRE=m CONFIG_NF_NAT_PROTO_UDPLITE=m CONFIG_NF_NAT_PROTO_SCTP=m CONFIG_NF_NAT_FTP=m CONFIG_NF_NAT_IRC=m CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_AMANDA=m CONFIG_NF_NAT_PPTP=m CONFIG_NF_NAT_H323=m CONFIG_NF_NAT_SIP=m |
what is the output of lsmod?
Here is mine: Code:
asus-gentoo linux # lsmod |
Double check that you are using the kernel that you think you are using (i.e. you are not installing your newer kernels into /boot without mounting it if it's a separate partition, and the like). Particularly, use uname -a and check the compilation date. lsmod, as said above, can also be helpful.
|
output of lsmod
Code:
portia marcusw # lsmod |
after a recompile, I get the same result.
|
|
Are there any modules in
Code:
/lib/modules/<your-kernel-version>/kernel/net/ipv4/netfilter Code:
lxde@gentoo-asus ~ $ ls -al /lib/modules/3.1.5-gentoo/kernel/net/ipv4/netfilter |
Hi
Looked in there and this is what I found: (kernel is 3.0.6-gentoo) Code:
ls netfilter -la |
Any more ideas about what may be causing this at all?
|
OK fixed it. I went and removed all references in /lib/modules/* (rm -rf), then re-emerged gentoo-sources, and then went and did genkernel --menuconfig all.
The actual error was not this: Code:
iptables v1.4.12.1: can't initialize iptables table `nat': iptables who? (do you need to insmod?) Code:
WARNING: Error inserting x_tables (/lib/modules/3.0.6-gentoo/kernel/net/netfilter/x_tables.ko): Invalid module format NOT for the faint of heart, I have to say. Thank you to all those who made suggestions here and elsewhere. |
All times are GMT -5. The time now is 02:29 PM. |