# Iptables problem [SOLVED]

## cuchumino

i have been following the iptables guide. after i compile iptables as modules in the kernel, and i then go modprobe ip_tables i get this error

```

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

```

i run dmesg, and i get this error.

```

ip_tables: disagrees about version of symbol skb_copy_bits

ip_tables: Unknown symbol skb_copy_bits

ip_tables: Unknown symbol nf_register_sockopt

ip_tables: Unknown symbol nf_unregister_sockopt

ip_tables: disagrees about version of symbol skb_copy_bits

ip_tables: Unknown symbol skb_copy_bits

ip_tables: Unknown symbol nf_register_sockopt

ip_tables: Unknown symbol nf_unregister_sockopt

```

i have no clue on how to fix this. any help will be aprecieated

[/

edit: i had put this right after i compiled the iptables module into the kernel. after posting this, i unloaded the via_rhine and mmi modules from the kernel, and tried to load the iptables module, with no luck either. then, when i tried to get via_rhine back to work, i got an error, and this is the dmesg

```

mii: disagrees about version of symbol netif_carrier_off

mii: Unknown symbol netif_carrier_off

mii: disagrees about version of symbol netif_carrier_on

mii: Unknown symbol netif_carrier_on

via_rhine: disagrees about version of symbol per_cpu__softnet_data

via_rhine: Unknown symbol per_cpu__softnet_data

via_rhine: disagrees about version of symbol ethtool_op_get_perm_addr

via_rhine: Unknown symbol ethtool_op_get_perm_addr

via_rhine: Unknown symbol mii_ethtool_sset

via_rhine: disagrees about version of symbol __netif_schedule

via_rhine: Unknown symbol __netif_schedule

via_rhine: Unknown symbol mii_link_ok

via_rhine: disagrees about version of symbol unregister_netdev

via_rhine: Unknown symbol unregister_netdev

via_rhine: disagrees about version of symbol ethtool_op_get_tx_csum

via_rhine: Unknown symbol ethtool_op_get_tx_csum

via_rhine: disagrees about version of symbol eth_type_trans

via_rhine: Unknown symbol eth_type_trans

via_rhine: Unknown symbol mii_check_media

via_rhine: disagrees about version of symbol kfree_skb

via_rhine: Unknown symbol kfree_skb

via_rhine: disagrees about version of symbol __alloc_skb

via_rhine: Unknown symbol __alloc_skb

via_rhine: disagrees about version of symbol netif_device_detach

via_rhine: Unknown symbol netif_device_detach

via_rhine: disagrees about version of symbol netif_device_attach

via_rhine: Unknown symbol netif_device_attach

via_rhine: disagrees about version of symbol skb_over_panic

via_rhine: Unknown symbol skb_over_panic

via_rhine: disagrees about version of symbol register_netdev

via_rhine: Unknown symbol register_netdev

via_rhine: disagrees about version of symbol free_netdev

via_rhine: Unknown symbol free_netdev

via_rhine: Unknown symbol mii_nway_restart

via_rhine: disagrees about version of symbol netif_rx

via_rhine: Unknown symbol netif_rx

via_rhine: disagrees about version of symbol netif_carrier_off

via_rhine: Unknown symbol netif_carrier_off

via_rhine: Unknown symbol generic_mii_ioctl

via_rhine: disagrees about version of symbol ethtool_op_get_sg

via_rhine: Unknown symbol ethtool_op_get_sg

via_rhine: disagrees about version of symbol netif_carrier_on

via_rhine: Unknown symbol netif_carrier_on

via_rhine: disagrees about version of symbol skb_copy_and_csum_dev

via_rhine: Unknown symbol skb_copy_and_csum_dev

via_rhine: disagrees about version of symbol skb_pad

via_rhine: Unknown symbol skb_pad

via_rhine: disagrees about version of symbol alloc_etherdev

via_rhine: Unknown symbol alloc_etherdev

via_rhine: Unknown symbol mii_ethtool_gset

```

:-/ is there anything i can do to fix this and have iptables? in the 2 years i have used gentoo, i have never been able to set up iptables.[/b]Last edited by cuchumino on Sat Sep 16, 2006 3:05 am; edited 3 times in total

----------

## Kosmas

It seems like a kernel and iptables version mismatch.

I would recompile the kernel and reemerge the iptables. It usually fixes those kind of problems (and don't forget to link the kernel directory in /usr/src as linu, it helps)

----------

## cuchumino

i did just that, and i still get this.

```
ip_tables: disagrees about version of symbol skb_copy_bits

ip_tables: Unknown symbol skb_copy_bits

ip_tables: Unknown symbol nf_register_sockopt

ip_tables: Unknown symbol nf_unregister_sockopt

```

----------

## cuchumino

im pretty sure that it has to do with something in the kernel itself....

wth is skb_copy_bits, nf_register_sockopt, and nf_unregister_sockopt.

im guessing that i have to do something with those modules in the kernel, either compile them or take em out.

----------

## hanj

Did you 'make modules_install' after recompiling? Also, can you give us the output of the following...

```
uname -a
```

```
ls -al /usr/src
```

```
ls -al /lib/modules/2.6.17-gentoo-r5/kernel/net/ipv4/
```

```
emerge -pv iptables
```

Here are my netfilter options in my kernel:

```
CONFIG_IP_NF_IPTABLES=m

CONFIG_NETFILTER=y

CONFIG_NETFILTER_XTABLES=m

CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m

CONFIG_NETFILTER_XT_TARGET_MARK=m

CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m

CONFIG_NETFILTER_XT_MATCH_COMMENT=m

CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m

CONFIG_NETFILTER_XT_MATCH_HELPER=m

CONFIG_NETFILTER_XT_MATCH_LENGTH=m

CONFIG_NETFILTER_XT_MATCH_LIMIT=m

CONFIG_NETFILTER_XT_MATCH_MAC=m

CONFIG_NETFILTER_XT_MATCH_MARK=m

CONFIG_NETFILTER_XT_MATCH_STATE=m

CONFIG_NETFILTER_XT_MATCH_STRING=m

CONFIG_NETFILTER_XT_MATCH_TCPMSS=m

CONFIG_IP_NF_CONNTRACK=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_IPRANGE=m

CONFIG_IP_NF_MATCH_TOS=m

CONFIG_IP_NF_MATCH_RECENT=m

CONFIG_IP_NF_MATCH_TTL=m

CONFIG_IP_NF_MATCH_OWNER=m

CONFIG_IP_NF_MATCH_ADDRTYPE=m

CONFIG_IP_NF_MATCH_HASHLIMIT=m

CONFIG_IP_NF_FILTER=m

CONFIG_IP_NF_TARGET_REJECT=m

CONFIG_IP_NF_TARGET_LOG=m

CONFIG_IP_NF_TARGET_TCPMSS=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_TTL=m

CONFIG_IP_NF_RAW=m
```

hanji

----------

## cuchumino

thankyou everyone for your help...

i got this fixed. It seems that the liveCD uses genkernel to compile the kernel. So it had the initramfs pointed in the grub.conf. That was the trouble i had, and thats why i had those errors.

all i did to fix this was redo the grub.conf and make it a non-genkernel boot. 

thanks again for your time.  :Very Happy:  i hope this helps someone in the future.

----------

