# IPTables not initialized after install

## Sela_Aragon

I need to start IPTables after install but KDE doen't show an option to turn firewall on and off in Gentoo like it did in my Red Hat 9. How can I 

(1) start the firewall with each login automatically and,

(2) Add the option to turn it on and off in KDE?

----------

## Sela_Aragon

OK I know this much: IPTables Is installed. Guarddog, however, says "Cannot determine Firewall command. Is IPChains or IPTables installed?"

Yes IPTables Is but simply typing IPTables isn't starting them. And I see no flag in IPTables --help which will start them either. This seems odd since with redhat9 iptables was the execute command.

----------

## Valhlalla

First make sure iptables is compiled into (or as modules)the kernel, try:

```
iptables -L
```

If you get an error most likley you are missing someting from the kernel.

Once that is resolved, then you need to create a ruleset (you can use whatever program you like or make your own).

once it is set up as you want use the iptables-save command to save the ruleset.

to make it auto start:

```
rc-update add iptables default
```

this will add to the boot up scripts.

to switch it on and off use:

```
/etc/init.d/iptables start

/etc/init.d/iptables stop
```

----------

## Sela_Aragon

OK i did the above and iptables still wont initialize. I even emerged it and it failed with this error (that I have also been seeing at startup each time):

/var/lib/init.d/depcache: Line 18: rpm:  Command Not Found

This error is evidently responsible for many of the problems I have been experiencing with GuardDog and nessus also but I have no clue what it means. I have been to this file and saw no rpm command anywhere in it.  :Sad: 

----------

## Valhlalla

Looks like you need to check through your kernel options,

Did you use genkernel or compile your own?

----------

## Sela_Aragon

I did a stage one install then got lazy and used genkernel. I need my ass kicked. Can I just compile a new kernel and it not crash me or make me lose all my driver settings/?

----------

## Valhlalla

If you want to use genkernel you can do it this way:

```
genkernel --menuconfig
```

to let you select all the good stuff, there are a bunch of things you will need to compile in or as modules to make iptables work, I cant remember them exactly if you cant find them try search the forums, I'm sure this has been covered before.

----------

## Valhlalla

You can recompile, I would make sure you back up the current one though incase somthing goes awry.

----------

## Sela_Aragon

Ill just drop down to a 2.4.* kernel and forget it. It is more stable and has more support. This 2.6.3 has been nothing but trouble for me. I just hope i dont lose all my driver settings

----------

## Sela_Aragon

Well that fixed me right up. I compiled a new kernel..I still get the same error on boot a million times..and now i cant load kdm.

Just wonderful  :Evil or Very Mad: 

----------

## pjp

Moved from Installing Gentoo.

----------

## honeymak

make sure the following:

modules in kernel - iptables support

iptables user space tools

iptables startup script

/etc/init.d/iptables save  <-- this to save ur rules

/etc/conf.d/iptables  <-- some options (not really relevant actually)

 :Rolling Eyes: 

----------

## Grayman

Well Hi there

I guess the headline says it all really - I need to compile iptables support in using the latest genkernel, but there is no obvious (to me anyway  :Smile: ) way to do this. I used to be able to go through the basic --config process, but this doesn't seem available now - any ideas guys ? (and girls...)

Grayman

----------

## Grayman

OK - I really shoulda looked at this part of the forum more carefully ! - --menuconfig .... yup I'm back with a GUI again and can fiddle the kernel to me little heart's content thanks All

Grayman

----------

