# iptables

## tom56

i can't get shorewall or firestarter to work.  i think it is an iptables problem.  here is the error message:

```
FATAL: Module ip_tables not found.

iptables v1.2.9: can't initialize iptables table `filter': iptables who? (do you need to insmod?)

Perhaps iptables or your kernel needs to be upgraded.
```

i only finished my gentoo install today, so needless to say i have the latest stable versions of everything.Last edited by tom56 on Sun Jul 11, 2004 4:34 pm; edited 2 times in total

----------

## Blue Fox

Try re-merge module-init-tools and modutils  :Wink: 

----------

## megalomani

make sure your kernel has

device drivers

 -> Networking support

      -> Networking options

            -> Network packet filtering

                 -> IP: Netfilter Configuration

                      ->  * IP tables support

                           * ...

in your kernel

----------

## tom56

does that have to be compiled in, or can it be done as a module?

----------

## HydroSan

 *tom56 wrote:*   

> does that have to be compiled in, or can it be done as a module?

 

Some horror stories can be told of IPTables stuff being compiled in, but I've had no problems here with my router having it compiled in. (With Loadable-Module support being turned off for added security.   :Razz:  )

----------

## tom56

sorry, i'm being an idiot - was that a yes i should use modules or a no i should compile it into my kernel?

----------

## tom56

network packet filtering isn't compiled in my kernel, and it can't be loaded as a module.  what should i do???

----------

## Deathwing00

 *tom56 wrote:*   

> network packet filtering isn't compiled in my kernel, and it can't be loaded as a module.  what should i do???

 

Recompile the kernel. If you will be using iptables permanently, the compile them built-in (or at least the iptables features you will use).

----------

## tom56

i've never recompiled a kernel before.  will it delete all my stuff?

----------

## tom56

*bump*  i really need an answer for this soon   :Confused: 

----------

## Deathwing00

No, it won't delete any of your stuff. Refer to the installation guide, manual kernel configuration. You can actually use the config of genkernel and simply change the options of iptables.

----------

## tom56

just to be sure, am i right in thinking that this will not delete my files or programs?  will it remove anything from rc-update?  will it remove my fstab?

if i were to compile using genkernel again would this be the correct way of doing it?

```
genkernel --menuconfig all
```

choose my options...  then

```
genkernel all
```

----------

## Deathwing00

It will NOT remove ANYTHING.

Just enter /usr/src/linux/ and make menuconfig, then get into the Network options and activate iptables. After that, make and then copy the required files into /boot/. Finally, reconfigure your bootloader.

Refer to this section of the installation guide.

Moved from Networking & Security as this one has become a Kernel matter.

----------

## tom56

how can i do that with genkernel?  i want to have the same stuff as before but with ip tables support.

----------

## Deathwing00

 *tom56 wrote:*   

> how can i do that with genkernel?  i want to have the same stuff as before but with ip tables support.

 

I will not repeat myself.

----------

## tom56

the thing you said before was make menuconfig.  when i did my install i chose genkernel all.  how do i recompile using that, so that i get all the same modules as before (the same ones as on the livecd)?

----------

## Deathwing00

 *tom56 wrote:*   

> the thing you said before was make menuconfig.  when i did my install i chose genkernel all.  how do i recompile using that, so that i get all the same modules as before (the same ones as on the livecd)?

 

In /usr/src/linux/ there is a file called .config, that's the kernel configuration file. So when you make menuconfig, it will automatically load it.

----------

## tom56

thank you.  i know my questions can be very annoying, but i've never done this before, and i don't want to screw up a system that took 3 days to install.

----------

## tom56

looks like i was right to ask so many questions.  i did EXACTLY what you said, and then I rebooted the computer.  now, when it starts up, it seems to be going fine, until it sprouts a bunch of crap, ending with "kernel panic: fatal exception interrupt", and just leaves me there, without a command line.  i need this fixed fast.  help!!!

----------

## tom56

please could someone help me!  i need this fixed asap!

----------

## tom56

i recompiled the kernel.  i will sort out iptables once i have sorted out this.

----------

## tom56

ok, i've recompiled all the iptables stuff as modules, and tried loading them one by one.  they all load fine apart from iptable_nat which causes "kernel panic: fatal exception interrupt" .   any ideas how to fix this?

----------

## tom56

i have done a "make clean" and recompiled my kernel, and I can now modprobe all the modules iptables needs.  when i start up firestarter or shorewall i get this message:

```
iptables: No chain/target/match by that name
```

but the firewall does seem to be working, because when i turn it on, i can't access the internet!  does anyone know what the message means?

EDIT: P.S. Please could a mod put this back into Networking and Security, as we are back on to that topic.

----------

## NeddySeagoon

tom56,

Shorewall is very picky about being configured before you run it.

Did you read and follow the configuration document.

The error message implies you have asked Shorewall to use a filter (by name) without defining the filter. Its possibly just a typo in the Shorewall configuration.

----------

