GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
I'm reasonably certain I had the /boot partition mounted when I compiled and copied over the files but I'm recompiling and copying them again just to be on the safe side.
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?)
Perhaps iptables or your kernel needs to be upgraded.
but when I looked in dmesg I saw a message saying:
Code:
WARNING: Error inserting x_tables (/lib/modules/3.0.6-gentoo/kernel/net/netfilter/x_tables.ko): Invalid module format
FATAL: Error inserting ip_tables (/lib/modules/3.0.6-gentoo/kernel/net/ipv4/netfilter/ip_tables.ko): Invalid module format
which is what directed me to this result.
NOT for the faint of heart, I have to say.
Thank you to all those who made suggestions here and elsewhere.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.