# Genkernel & iptables

## DaveHope

Hello all,

Am a new Gentoo user of about a week now and have one issue  :Smile:  I'm using genkernel to compile my kernel however no iptables support seems to be avaliable, having emerged iptables I go to modprobe ip_tables and I see:

 *Quote:*   

> FATAL: Module ip_tables not found.

 

Ignoring that, I proceeded to try and flush out any rules:

 *Quote:*   

> bash-2.05b# iptables -F
> 
> FATAL: Module ip_tables not found.
> 
> iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
> ...

 

Is there a simple way to enable iptables support for a genkernel? Or will I have to resort to editing .config files?

Just as a point of reference, I'm compiling with genkernel like so:

genkernel --clean --mrproper --install --no-mountboot --udev --bootsplash --bootloader=grub all

----------

## Admiral LSD

Best bit of advice anyone can give you about Gentoo:

Avoid Genkernel like the plague

Seriously. Genkernel is more trouble than it's worth

It's not *that* hard to compile a kernel by hand either so give it a try  :Smile: 

----------

## taskara

sure there is, 

run "make menuconfig" from your /usr/src/linux dir and go to device drivers -> networking support -> network options -> [*] Network packet filtering -> IP: Netfilter Configuration -> and make sure you have these options as modules, including IP Tables Support

run make modules modules_install

and try again!

you should have the modules you need now

----------

## DaveHope

 *Quote:*   

> Avoid Genkernel like the plague

 

Thanks, have heard it before. I'm aware of the downsides of using genkernel, however until I'm fully settled with Gentoo I'm remaining with genkernel.

 *Quote:*   

> 
> 
> run "make menuconfig" from your /usr/src/linux dir and go to device drivers -> networking support -> network options -> [*] Network packet filtering -> IP: Netfilter Configuration -> and make sure you have these options as modules, including IP Tables Support
> 
> run make modules modules_install
> ...

 

Done, thanks. However, however ip_tables fails to load with symbol errors:

 *Quote:*   

> bash-2.05b# modprobe ip_tables
> 
> FATAL: Error inserting ip_tables (/lib/modules/2.6.9/kernel/net/ipv4/netfilter/ip_tables.ko): Unknown symbol in module, or unknown parameter (see dmesg)
> 
> 

 

And, dmesg:

 *Quote:*   

> ip_tables: Unknown symbol nf_register_sockopt
> 
> ip_tables: Unknown symbol nf_unregister_sockopt

 

Edit:  Should have said, using 2.6.9  :Smile: 

----------

## taskara

I'm not sure, but did you make everything as modules in there? or just IP Tables Support? did you re-compile iptables?

----------

## taskara

https://forums.gentoo.org/viewtopic.php?t=107331&highlight=iptables+unknown+symbol+nfregistersockopt

https://forums.gentoo.org/viewtopic.php?t=156118&highlight=iptables+unknown+symbol+nfregistersockopt

and

https://forums.gentoo.org/viewtopic.php?t=146230&highlight=iptables+unknown+symbol+nfregistersockopt

----------

## DaveHope

I just modularized iptables support, as seen below:

 <M> IP tables support (required for filtering/masq/NAT)

Everything blow it was left untouched. My .config file can be seen here

----------

## taskara

 *DaveHope wrote:*   

> I just modularized iptables support, as seen below:
> 
>  <M> IP tables support (required for filtering/masq/NAT)
> 
> Everything blow it was left untouched. My .config file can be seen here

 

did you follow my advice, and the links as above? I don't actually know the solution, sorry, but looks like others may. good luck!

----------

## DaveHope

Sorry, didn't see them there. Am currently following instructions an re-emerging linux26-headers & glibc followed by iptables, so could take a little bit of time  :Smile:  Thanks though. Will let you know how I get on.

----------

## DaveHope

No go  :Sad:  - Just emerged linux26-headers, glibc & iptables and am still getting the error. Any ideas, anyone..?

----------

## DaveHope

Ditched Genkernel, built iptables support into the kernel rather than a module, and it works  :Smile: 

----------

## taskara

hence why Admiral LSD` said to avoid genkernel like the plague  :Wink: 

----------

