# [Solved] iptable problem after gcc update

## uberhanz

Hi!

After updating my gcc to the lastest version I have problems with iptable. Before I did this everything was going fine and iptables was working as intended. (Same holds for nvidia stuff. So my guess is these are related)

I have done make clean, make && make modules_install in /usr/src/linux too and unmerged and emerged iptables.

Still I have this error message :

iptables -L

FATAL: Module ip_tables not found.

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

Perhaps iptables or your kernel needs to be upgraded.

Any help would be greatly appreciated. please do tell if I should post additional information (and how to obtain it to be on the safe side). This is getting frustrating  :Sad: Last edited by uberhanz on Fri Jan 06, 2006 10:31 pm; edited 1 time in total

----------

## steveb

How about loading the ip_tables module?

```
modprobe ip_tables
```

Or maybe this?

```
for foo in $(ls -1 /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/);do modprobe $(basename ${foo} .ko);done
```

cheers

SteveB

----------

## uberhanz

I get the following error messages:

modprobe ip_tables

FATAL: Module ip_tables not found.

for foo in $(ls -1 /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter/);do modprobe $(basename ${foo} .ko);done

FATAL: Error inserting ipt_CLASSIFY (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_CLASSIFY.ko): Invalid module format

FATAL: Error inserting ipt_DSCP (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_DSCP.ko): Invalid module format

FATAL: Error inserting ipt_ECN (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_ECN.ko): Invalid module format

FATAL: Error inserting ipt_LOG (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_LOG.ko): Invalid module format

FATAL: Error inserting ipt_MARK (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_MARK.ko): Invalid module format

FATAL: Error inserting ipt_NETMAP (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_NETMAP.ko): Invalid module format

FATAL: Error inserting ipt_REJECT (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_REJECT.ko): Invalid module format

FATAL: Error inserting ipt_TOS (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_TOS.ko): Invalid module format

FATAL: Error inserting ipt_conntrack (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_conntrack.ko): Invalid module format

FATAL: Error inserting ipt_limit (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_limit.ko): Invalid module format

FATAL: Error inserting ipt_mark (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_mark.ko): Invalid module format

FATAL: Error inserting ipt_multiport (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_multiport.ko): Invalid module format

FATAL: Error inserting ipt_owner (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_owner.ko): Invalid module format

FATAL: Error inserting ipt_recent (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_recent.ko): Invalid module format

FATAL: Error inserting ipt_state (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/ipt_state.ko): Invalid module format

FATAL: Error inserting iptable_filter (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/iptable_filter.ko): Invalid module format

FATAL: Error inserting iptable_mangle (/lib/modules/2.6.14-ck6/kernel/net/ipv4/netfilter/iptable_mangle.ko): Invalid module format

----------

## steveb

Looks like you need to rebuild the kernel again. Before making "modules_install" you better delete teh content of /lib/modules/your-kernel-revision.

cheers

SteveB

----------

## uberhanz

tnx for the replies, but the problem still remains. I wonder if I have missed something obvious  :Sad: 

----------

## steveb

Did you select any netfilter stuff in the kernel?

```
grep ^CONFIG_IP_NF /usr/src/linux/.config
```

On my system I have those active:

```
CONFIG_IP_NF_CONNTRACK=m

CONFIG_IP_NF_CONNTRACK_EVENTS=y

CONFIG_IP_NF_CONNTRACK_NETLINK=m

CONFIG_IP_NF_FTP=m

CONFIG_IP_NF_IRC=m

CONFIG_IP_NF_TFTP=m

CONFIG_IP_NF_AMANDA=m

CONFIG_IP_NF_QUEUE=m

CONFIG_IP_NF_IPTABLES=m

CONFIG_IP_NF_MATCH_LIMIT=m

CONFIG_IP_NF_MATCH_IPRANGE=m

CONFIG_IP_NF_MATCH_MAC=m

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

CONFIG_IP_NF_MATCH_AH_ESP=m

CONFIG_IP_NF_MATCH_LENGTH=m

CONFIG_IP_NF_MATCH_TTL=m

CONFIG_IP_NF_MATCH_TCPMSS=m

CONFIG_IP_NF_MATCH_HELPER=m

CONFIG_IP_NF_MATCH_STATE=m

CONFIG_IP_NF_MATCH_CONNTRACK=m

CONFIG_IP_NF_MATCH_OWNER=m

CONFIG_IP_NF_MATCH_ADDRTYPE=m

CONFIG_IP_NF_MATCH_REALM=m

CONFIG_IP_NF_MATCH_STRING=m

CONFIG_IP_NF_FILTER=m

CONFIG_IP_NF_TARGET_REJECT=m

CONFIG_IP_NF_TARGET_LOG=m

CONFIG_IP_NF_TARGET_ULOG=m

CONFIG_IP_NF_TARGET_TCPMSS=m

CONFIG_IP_NF_TARGET_NFQUEUE=m

CONFIG_IP_NF_NAT=m

CONFIG_IP_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=m

CONFIG_IP_NF_TARGET_REDIRECT=m

CONFIG_IP_NF_TARGET_NETMAP=m

CONFIG_IP_NF_TARGET_SAME=m

CONFIG_IP_NF_NAT_SNMP_BASIC=m

CONFIG_IP_NF_NAT_IRC=m

CONFIG_IP_NF_NAT_FTP=m

CONFIG_IP_NF_NAT_TFTP=m

CONFIG_IP_NF_NAT_AMANDA=m

CONFIG_IP_NF_MANGLE=m

CONFIG_IP_NF_TARGET_TOS=m

CONFIG_IP_NF_TARGET_ECN=m

CONFIG_IP_NF_TARGET_DSCP=m

CONFIG_IP_NF_TARGET_MARK=m

CONFIG_IP_NF_TARGET_CLASSIFY=m

CONFIG_IP_NF_TARGET_TTL=m

CONFIG_IP_NF_RAW=m

CONFIG_IP_NF_TARGET_NOTRACK=m

CONFIG_IP_NF_ARPTABLES=m

CONFIG_IP_NF_ARPFILTER=m

CONFIG_IP_NF_ARP_MANGLE=m
```

cheers

SteveB

----------

## uberhanz

grep ^CONFIG_IP_NF /usr/src/linux/.config

CONFIG_IP_NF_CONNTRACK=y

CONFIG_IP_NF_IRC=y

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP_NF_MATCH_LIMIT=m

CONFIG_IP_NF_MATCH_IPRANGE=y

CONFIG_IP_NF_MATCH_MAC=y

CONFIG_IP_NF_MATCH_PKTTYPE=y

CONFIG_IP_NF_MATCH_MARK=m

CONFIG_IP_NF_MATCH_MULTIPORT=m

CONFIG_IP_NF_MATCH_TOS=y

CONFIG_IP_NF_MATCH_RECENT=m

CONFIG_IP_NF_MATCH_HELPER=y

CONFIG_IP_NF_MATCH_STATE=m

CONFIG_IP_NF_MATCH_CONNTRACK=m

CONFIG_IP_NF_MATCH_OWNER=m

CONFIG_IP_NF_FILTER=m

CONFIG_IP_NF_TARGET_REJECT=m

CONFIG_IP_NF_TARGET_LOG=m

CONFIG_IP_NF_NAT=y

CONFIG_IP_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=y

CONFIG_IP_NF_TARGET_REDIRECT=y

CONFIG_IP_NF_TARGET_NETMAP=m

CONFIG_IP_NF_NAT_IRC=y

CONFIG_IP_NF_MANGLE=m

CONFIG_IP_NF_TARGET_TOS=m

CONFIG_IP_NF_TARGET_ECN=m

CONFIG_IP_NF_TARGET_DSCP=m

CONFIG_IP_NF_TARGET_MARK=m

CONFIG_IP_NF_TARGET_CLASSIFY=m

The thing is that I used this exact same config file before the gcc upgrade and everything was working just fine(including iptables and nvidia). 

tnx for the replies:)

----------

## magic919

Did you copy over the new  kernel to /boot after you built it?

----------

## uberhanz

 *magic919 wrote:*   

> Did you copy over the new  kernel to /boot after you built it?

 

It seems that I my brain is out taking a LONG walk. Of course I had forgotten to copy the new kernel to /boot. 

Thanks for all your replies. At least I learned new stuff   :Rolling Eyes: 

----------

