# Iptables hates my kernel [SOLVED]

## astra05

I am using iptables-1.3.4 and kernel openmosix-2.4.30

this box is going to be the master of the cluster and the dhcp server for the cluster.

i try to flush iptables or do any iptables command and i get this: 

```

# iptables -F

modprobe: Can't locate module ip_tables

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

Perhaps iptables or your kernel needs to be upgraded.

```

I have compiled every option in the kernel under networking options as either a module or a monolithic device. Still nothing. I really need help to get this cluster up

----------

## wah

Maybe a silly question, but did you 

```

# modprobe ip_tables

```

Also, do a 

```

# modprobe -l

```

and post the output.

Cheers,

Wah

----------

## clintpatty

Does your kernel know

```
# echo 1 > /proc/sys/net/ipv4/ip_forward

# for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do echo 1 > $f ; done
```

Does your sysctl.conf have

```
net.ipv4.ip_forward = 1

net.ipv4.conf.default.rp_filter = 1
```

----------

## astra05

```
# modprobe ip_tables

modprobe: Can't locate module ip_tables

```

iand 

```
#modprobe -l

/lib/modules/2.4.30-om-migshm/kernel/crypto/aes.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/anubis.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/arc4.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/blowfish.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/cast5.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/cast6.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/crypto_null.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/deflate.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/des.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/khazad.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/md4.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/md5.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/michael_mic.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/serpent.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha1.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha256.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha512.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/tea.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/twofish.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/wp512.o

/lib/modules/2.4.30-om-migshm/kernel/drivers/net/dummy.o

/lib/modules/2.4.30-om-migshm/kernel/fs/autofs/autofs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/fat/fat.o

/lib/modules/2.4.30-om-migshm/kernel/fs/msdos/msdos.o

/lib/modules/2.4.30-om-migshm/kernel/fs/romfs/romfs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/smbfs/smbfs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/vfat/vfat.o

/lib/modules/2.4.30-om-migshm/kernel/lib/zlib_deflate/zlib_deflate.o

/lib/modules/2.4.30-om-migshm/kernel/lib/zlib_inflate/zlib_inflate.o

/lib/modules/2.4.30-om-migshm/kernel/net/802/p8022.o

/lib/modules/2.4.30-om-migshm/kernel/net/802/psnap.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/ip_gre.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/ipip.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arp_tables.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arpt_mangle.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arptable_filter.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_amanda.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_ftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_irc.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_tftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_amanda.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_ftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_irc.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_tftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_queue.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_DSCP.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ECN.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_LOG.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_MARK.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_MASQUERADE.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_REDIRECT.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_TCPMSS.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_TOS.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ULOG.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ah.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_conntrack.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_dscp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ecn.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_esp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_helper.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_length.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_limit.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_mark.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_multiport.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_pkttype.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_recent.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_state.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_tcpmss.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_tos.o

/lib/modulemodprobe -l

/lib/modules/2.4.30-om-migshm/kernel/crypto/aes.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/anubis.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/arc4.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/blowfish.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/cast5.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/cast6.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/crypto_null.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/deflate.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/des.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/khazad.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/md4.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/md5.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/michael_mic.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/serpent.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha1.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha256.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/sha512.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/tea.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/twofish.o

/lib/modules/2.4.30-om-migshm/kernel/crypto/wp512.o

/lib/modules/2.4.30-om-migshm/kernel/drivers/net/dummy.o

/lib/modules/2.4.30-om-migshm/kernel/fs/autofs/autofs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/fat/fat.o

/lib/modules/2.4.30-om-migshm/kernel/fs/msdos/msdos.o

/lib/modules/2.4.30-om-migshm/kernel/fs/romfs/romfs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/smbfs/smbfs.o

/lib/modules/2.4.30-om-migshm/kernel/fs/vfat/vfat.o

/lib/modules/2.4.30-om-migshm/kernel/lib/zlib_deflate/zlib_deflate.o

/lib/modules/2.4.30-om-migshm/kernel/lib/zlib_inflate/zlib_inflate.o

/lib/modules/2.4.30-om-migshm/kernel/net/802/p8022.o

/lib/modules/2.4.30-om-migshm/kernel/net/802/psnap.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/ip_gre.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/ipip.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arp_tables.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arpt_mangle.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/arptable_filter.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_amanda.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_ftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_irc.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_conntrack_tftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_amanda.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_ftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_irc.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_nat_tftp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_queue.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_DSCP.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ECN.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_LOG.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_MARK.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_MASQUERADE.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_REDIRECT.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_TCPMSS.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_TOS.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ULOG.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ah.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_conntrack.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_dscp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ecn.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_esp.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_helper.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_length.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_limit.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_mark.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_multiport.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_pkttype.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_recent.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_state.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_tcpmss.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_tos.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ttl.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_filter.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_mangle.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_nat.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipx/ipx.o

/lib/modules/2.4.30-om-migshm/kernel/net/netlink/netlink_dev.o

/lib/modules/2.4.30-om-migshm/kernel/net/packet/af_packet.o

/lib/modules/2.4.30-om-migshm/kernel/net/unix/unix.o

s/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ipt_ttl.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_filter.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_mangle.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/iptable_nat.o

/lib/modules/2.4.30-om-migshm/kernel/net/ipx/ipx.o

/lib/modules/2.4.30-om-migshm/kernel/net/netlink/netlink_dev.o

/lib/modules/2.4.30-om-migshm/kernel/net/packet/af_packet.o

/lib/modules/2.4.30-om-migshm/kernel/net/unix/unix.o

```

so i guess that is not a thing.

----------

## astra05

 *clintpatty wrote:*   

> Does your kernel know
> 
> ```
> # echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> ...

 

I did your first command and that did not help at all and that syntax was not in sysctl.conf or anywhere to be found.  :Sad: 

----------

## wah

Ok, so no ip_tables module - does that mean you've compiled it in to the kernel?

I use a 2.6 kernel, so I'm not too sure how it should react on a 2.4...but it would be my impression that it should be the same.

Also, if you do a:

```

# dmesg | grep iptables

```

do you get anything?

----------

## astra05

 *wahman143 wrote:*   

> Ok, so no ip_tables module - does that mean you've compiled it in to the kernel?
> 
> I use a 2.6 kernel, so I'm not too sure how it should react on a 2.4...but it would be my impression that it should be the same.
> 
> Also, if you do a:
> ...

 

Nothing i thought i Compiled it into the kernel this last time.

is there a good command to search the .config for anything relating to iptables?

----------

## astra05

IP: Netfilter Configuration

#

CONFIG_IP_NF_CONNTRACK=y

CONFIG_IP_NF_FTP=m

CONFIG_IP_NF_AMANDA=m

CONFIG_IP_NF_TFTP=m

CONFIG_IP_NF_IRC=m

CONFIG_IP_NF_QUEUE=m

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP_NF_MATCH_LIMIT=m

CONFIG_IP_NF_MATCH_MAC=y

CONFIG_IP_NF_MATCH_PKTTYPE=m

CONFIG_IP_NF_MATCH_MARK=m

CONFIG_IP_NF_MATCH_MULTIPORT=m

CONFIG_IP_NF_MATCH_TOS=m

CONFIG_IP_NF_MATCH_RECENT=m

CONFIG_IP_NF_MATCH_ECN=m

CONFIG_IP_NF_MATCH_DSCP=m

that is the stuff inside the kernel config file. I don't see how iptables isn't working properly.

----------

## soya

all you need is iptables support in your kernel image and then

```
emerge iptables
```

hope it helps  :Smile: 

----------

## astra05

 *soya wrote:*   

> all you need is iptables support in your kernel image and then
> 
> ```
> emerge iptables
> ```
> ...

 

as you can see i have iptables from the configuration i posted.

i've 

```
USE="extensions" emerge iptables
```

serveral times after each kernel recompliation

----------

## wah

Maybe try recompiling with iptables as a module...then do a modprobe -l and see if it shows up.

----------

## astra05

```
 # iptables -F

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: /lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: unresolved symbol nf_unregister_sockopt

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: /lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: unresolved symbol nf_register_sockopt

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: insmod /lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o failed

/lib/modules/2.4.30-om-migshm/kernel/net/ipv4/netfilter/ip_tables.o: insmod ip_tables failed

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

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

great so i recompiled the kernel with iptables as a module and now this happens. openmosix hates iptables.

----------

## astra05

The solution was to regrade to the 2.4.26 openmosix kernel and configure iptables that way. the 2.4.30 om kernel is very unstable. thanks dli for the help.

----------

