LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   iptables: can't initialize iptables table `NAT' (https://www.linuxquestions.org/questions/linux-kernel-70/iptables-cant-initialize-iptables-table-%60nat-672439/)

linuxgentoo 09-26-2008 12:29 AM

iptables: can't initialize iptables table `NAT'
 
my kernel version is 2.6.26
I cannot find which item in kernel config provide the NAT module

the following this netfilter config in my kernel


Code:

#
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_ADDRTYPE=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_MANGLE=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m


thanks for your help

verndog 09-26-2008 11:27 AM

What does the ouput of your config file show
Code:

grep IPTABLES .config
Mine is not set, as shown below.
# CONFIG_IP_NF_IPTABLES is not set

madyogi 02-13-2009 02:05 PM

Still no go :(
 
I have exactly the same problem on my Linux Box. I've just compiled a 2.6.26 (previous one was 2.6.15). I need it because the wireless NIC compiles with it and doesn't want to build as 2.6.15 module.

Back to the point.
I already have:
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP6_NF_IPTABLES=m
defined as modules in a '.config' file but they seem not to build at all or are created under different names. ??? (hard to believe)

Well this is a list of modules that were created for 2.6.26:
arp_tables.ko ipt_ECN.ko ipt_ULOG.ko iptable_filter.ko
arptable_filter.ko ipt_LOG.ko ipt_ecn.ko iptable_mangle.ko
ip_tables.ko ipt_REJECT.ko ipt_ttl.ko

And here are those that were build with old 2.6.15:
arp_tables.ko ip_nat_tftp.ko ipt_ULOG.ko ipt_owner.ko
arptable_filter.ko ip_queue.ko ipt_ah.ko ipt_pkttype.ko
ip_conntrack.ko ip_tables.ko ipt_conntrack.ko ipt_state.ko
ip_conntrack_amanda.ko ipt_DSCP.ko ipt_dscp.ko ipt_tcpmss.ko
ip_conntrack_ftp.ko ipt_ECN.ko ipt_ecn.ko ipt_tos.ko
ip_conntrack_irc.ko ipt_LOG.ko ipt_esp.ko ipt_ttl.ko
ip_conntrack_tftp.ko ipt_MARK.ko ipt_helper.ko iptable_filter.ko
ip_nat.ko ipt_MASQUERADE.ko ipt_length.ko iptable_mangle.ko
ip_nat_amanda.ko ipt_REDIRECT.ko ipt_limit.ko iptable_nat.ko
ip_nat_ftp.ko ipt_REJECT.ko ipt_mac.ko
ip_nat_irc.ko ipt_TCPMSS.ko ipt_mark.ko
ip_nat_snmp_basic.ko ipt_TOS.ko ipt_multiport.ko

As you can see there are many many more...
I compiled the new kernel by placing the old .config file from previous build of 2.6.15 into the build directory and run make oldconfig..:

$ cd /usr/src/linux-2.6.26
$ make O=/root/linux-build mrproper
$ cp <olddist-build>.config /root/linux-build/.config
$ make O=/root/linux-build oldconfig
$ make O=/root/linux-build bzImage modules modules_install

I'm not a newbie in a kernels world but this one really confused me...
Can anyone help, please?

madyogi 01-17-2010 10:15 AM

Solution.
 
Forgot with time that I made this post. Anyway the solution was to remove the '.config' and don't use the "make O=... oldconfig" but creating a default, clean config again and disabling unnecessary modules.


All times are GMT -5. The time now is 04:03 AM.