# [Solved] iptables/NAT Problem, kernel should be ok

## moben

Problem:

```
gebox ~ # iptables -F

gebox ~ # iptables -t NAT -F

FATAL: Module ip_tables not found.

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

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

Read much here about this Problem, but nothing solved it for me  :Sad:  Compiled anything in the kernel, compiling as modules didnt work as well :/

What can i do???  :Sad: 

```
gebox ~ # uname -a

Linux gebox 2.6.27-gentoo-r8 #1 SMP Sun Feb 8 11:25:53 CET 2009 i686 Intel(R) Celeron(R) CPU 2.53GHz GenuineIntel GNU/Linux

gebox ~ # zgrep CONFIG_NF /proc/config.gz

CONFIG_NF_CONNTRACK=y

CONFIG_NF_CT_ACCT=y

CONFIG_NF_CONNTRACK_MARK=y

CONFIG_NF_CONNTRACK_SECMARK=y

CONFIG_NF_CONNTRACK_EVENTS=y

# CONFIG_NF_CT_PROTO_DCCP is not set

CONFIG_NF_CT_PROTO_GRE=y

# CONFIG_NF_CT_PROTO_SCTP is not set

CONFIG_NF_CT_PROTO_UDPLITE=y

CONFIG_NF_CONNTRACK_AMANDA=y

CONFIG_NF_CONNTRACK_FTP=y

# CONFIG_NF_CONNTRACK_H323 is not set

CONFIG_NF_CONNTRACK_IRC=y

CONFIG_NF_CONNTRACK_NETBIOS_NS=y

CONFIG_NF_CONNTRACK_PPTP=y

# CONFIG_NF_CONNTRACK_SANE is not set

CONFIG_NF_CONNTRACK_SIP=y

CONFIG_NF_CONNTRACK_TFTP=y

CONFIG_NF_CT_NETLINK=y

CONFIG_NF_CONNTRACK_IPV4=y

CONFIG_NF_CONNTRACK_PROC_COMPAT=y

CONFIG_NF_NAT=y

CONFIG_NF_NAT_NEEDED=y

CONFIG_NF_NAT_SNMP_BASIC=y

CONFIG_NF_NAT_PROTO_GRE=y

CONFIG_NF_NAT_PROTO_UDPLITE=y

CONFIG_NF_NAT_FTP=y

CONFIG_NF_NAT_IRC=y

CONFIG_NF_NAT_TFTP=y

CONFIG_NF_NAT_AMANDA=y

CONFIG_NF_NAT_PPTP=y

# CONFIG_NF_NAT_H323 is not set

CONFIG_NF_NAT_SIP=y

# CONFIG_NF_CONNTRACK_IPV6 is not set

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=y

# CONFIG_NFSD is not set

CONFIG_NFS_ACL_SUPPORT=y

CONFIG_NFS_COMMON=y
```

Solution:

 *Quote:*   

> iptables -t nat -F

 

instead of

 *Quote:*   

> iptables -t NAT -F

 

works...Last edited by moben on Mon Feb 09, 2009 4:11 pm; edited 1 time in total

----------

## cyrillic

The symbol you are looking for is IP_NF_IPTABLES

----------

## moben

all enabled :/

 *Quote:*   

> gebox ~ # zgrep IP_NF /proc/config.gz
> 
> # CONFIG_IP_NF_QUEUE is not set
> 
> CONFIG_IP_NF_IPTABLES=y
> ...

 

----------

## Hu

 *moben wrote:*   

> all enabled :/
> 
> 

 

No.  Your own output shows you do not have IP_NF_TABLES enabled.  You need to run menuconfig again and activate IP_NF_TABLES.  You may need to activate some prerequisites before it becomes visible.

----------

## moben

 *Quote:*   

> CONFIG_IP_NF_IPTABLES=y

 

i thought this mean its enabled?!

next try with modules...

 *Quote:*   

> gebox ~ # lsmod | grep ip
> 
> iptable_filter         10624  0 
> 
> iptable_nat            13064  0 
> ...

 

 *Quote:*   

> gebox ~ # cat /proc/net/ip_tables_names
> 
> filter
> 
> nat

 

Whats wrong?  :Sad: 

----------

## Hu

 *moben wrote:*   

> 
> 
>  *Quote:*   
> 
> gebox ~ # iptables -t NAT -F
> ...

 

Yes.  I was mistaken.  I did a text search of the page for what cyrillic had typed, and somehow failed to see that your output matched that search.

I just noticed your real problem though: you are trying to access a table which has never been part of the Linux kernel.  Its name is nat, not NAT!

----------

## moben

Ohh holy shit -.- ok thanks  :Smile: 

----------

