# [SOLVED] iptables  Fatal: error inserting ip_tables

## dharm

as the topic says, i cannot load iptables module...

```
# uname -a

Linux localhost 2.6.14-gentoo-r6 #1 Mon Jan 2 23:26:33 PST 2006 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
```

i added all modules in kernel config which pertain to iptables... (followed http://gentoo-wiki.com/HOWTO_Iptables_for_newbies ) 

i have emerged latest iptables 1.3.4

when i modprobe ip_tables

```
 # modprobe ip_tables

FATAL: Error inserting ip_tables (/lib/modules/2.6.14-gentoo-r6/kernel/net/ipv4/netfilter/ip_tables.ko): Unknown symbol in module, or unknown parameter (see dmesg)

# dmesg | grep ip_tables

ip_tables: Unknown symbol nf_register_sockopt

ip_tables: Unknown symbol nf_unregister_sockopt

```

here is my kernel config

```

#

# IP: Netfilter Configuration

#

CONFIG_IP_NF_CONNTRACK=m

# CONFIG_IP_NF_CT_ACCT is not set

# CONFIG_IP_NF_CONNTRACK_MARK is not set

CONFIG_IP_NF_CONNTRACK_EVENTS=y

# CONFIG_IP_NF_CT_PROTO_SCTP is not set

CONFIG_IP_NF_FTP=m

CONFIG_IP_NF_IRC=m

# CONFIG_IP_NF_NETBIOS_NS is not set

CONFIG_IP_NF_TFTP=m

CONFIG_IP_NF_AMANDA=m

# CONFIG_IP_NF_PPTP is not set

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_SCTP is not set

# CONFIG_IP_NF_MATCH_DCCP is not set

# CONFIG_IP_NF_MATCH_COMMENT is not set

# CONFIG_IP_NF_MATCH_HASHLIMIT is not set

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
```

Last edited by dharm on Sun Jan 08, 2006 5:42 am; edited 1 time in total

----------

## jmp_

mmm Try to compile netfilter built-in.

CONFIG_NETFILTER=y

# CONFIG_NETFILTER_DEBUG is not set

CONFIG_BRIDGE_NETFILTER=y

[...]

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP6_NF_IPTABLES=m

[...]

Check your kernel config and netfilter additional support and compile again netfilter/iptables.

...and then try iptables -L  :Razz: 

greetings.

---

P.D.:

Note: iptables is the userspace tool that provides netfilter (that's kernel stuff) manipulation in real-time.

----------

## dharm

 *jmp_ wrote:*   

> mmm Try to compile netfilter built-in.
> 
> CONFIG_NETFILTER=y
> 
> # CONFIG_NETFILTER_DEBUG is not set
> ...

 

thanks for the quick reply ^^

i had tried that earliar... no go...

but, what i did was remove /lib/modules/2.6.14-gentoo-r6

then make && make modules_install install

then rebooted

then tried to modprobe ip_tables, didnt get a error message

```
# iptables -L

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. 
```

then i tried

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

and it worked^^

i guess my problem is solved

----------

