Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] iptables/NAT Problem, kernel should be ok
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
moben
n00b
n00b


Joined: 09 Jan 2009
Posts: 52

PostPosted: Sun Feb 08, 2009 11:03 am    Post subject: [Solved] iptables/NAT Problem, kernel should be ok Reply with quote

Problem:
Code:
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 :( Compiled anything in the kernel, compiling as modules didnt work as well :/
What can i do??? :(

Code:
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
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Feb 08, 2009 12:52 pm    Post subject: Reply with quote

The symbol you are looking for is IP_NF_IPTABLES
Back to top
View user's profile Send private message
moben
n00b
n00b


Joined: 09 Jan 2009
Posts: 52

PostPosted: Sun Feb 08, 2009 1:19 pm    Post subject: Reply with quote

all enabled :/

Quote:
gebox ~ # zgrep IP_NF /proc/config.gz
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_RECENT=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_ADDRTYPE=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_TTL=y
CONFIG_IP_NF_TARGET_CLUSTERIP=y
CONFIG_IP_NF_RAW=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Sun Feb 08, 2009 5:35 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
moben
n00b
n00b


Joined: 09 Jan 2009
Posts: 52

PostPosted: Sun Feb 08, 2009 7:27 pm    Post subject: Reply with quote

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
nf_nat 23832 1 iptable_nat
nf_conntrack_ipv4 20492 3 iptable_nat,nf_nat
ip_tables 18576 2 iptable_filter,iptable_nat
x_tables 21252 2 iptable_nat,ip_tables
ipv6 213156 10
gebox ~ # iptables -F
gebox ~ # iptables -t NAT -F
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.


Quote:
gebox ~ # cat /proc/net/ip_tables_names
filter
nat


Whats wrong? :(
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Sun Feb 08, 2009 11:09 pm    Post subject: Reply with quote

moben wrote:

Quote:

gebox ~ # iptables -t NAT -F
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.


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!
Back to top
View user's profile Send private message
moben
n00b
n00b


Joined: 09 Jan 2009
Posts: 52

PostPosted: Mon Feb 09, 2009 4:06 pm    Post subject: Reply with quote

Ohh holy shit -.- ok thanks :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum