LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2011, 04:18 AM   #1
Pratap Ramachandra
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
iptables failing


Hi,
I am unable to get iptables to run on my linux box(running 2.6.16)
I get the following error :

#iptables -t nat -L

iptables v1.2.9: can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_DCCP=y
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_REALM=y
CONFIG_NETFILTER_XT_MATCH_SCTP=y
CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_CT_ACCT=y
CONFIG_IP_NF_FILTER=m
...
....

Please let me know how can I overcome this issue

Thanks
Pratap
 
Old 01-30-2011, 07:30 AM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
Here's a list of the modules that iptables needs.
Code:
# Module to track the state of connections
modprobe ip_conntrack

# Load the iptables active FTP module, requires ip_conntrack
modprobe ip_conntrack_ftp
  
# Load iptables NAT module when required
modprobe iptable_nat
 
# Module required for active an FTP server using NAT
modprobe ip_nat_ftp
You can check and see if you have those modules loaded by running lsmod. If not run, like above, modprobe iptable_nat (which is probably the only one you need). If it says it can't find the module, then you need to recompile your kernel to include either the iptables_nat module or have it built in.
 
Old 01-30-2011, 08:05 AM   #3
Pratap Ramachandra
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,
Thanks for the information. Recompile means I have to set the
CONFIG_IP_NF_FILTER=y instead of CONFIG_IP_NF_FILTER=m is it ?

After I do this I need to rebuild my kernel .Should i also to make some re-build the iptables utility ?

Thanks
Pratap
 
Old 01-30-2011, 03:14 PM   #4
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
First try loading up the module. If your current config has
Code:
CONFIG_IP_NF_FILTER=m
then it was compiled as a module.

Just run
Code:
modprobe iptable_nat
 
1 members found this post helpful.
Old 02-10-2011, 05:21 AM   #5
Pratap Ramachandra
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Hi ,
Thanks for the help.
I have another query.
Is it necessary to build netfilter as a module always ? If we build it into the kernel , still iptables should work right ?
Please let me know

Thanks
Pratap
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPtables failing to load: unknown ruleset bureado Linux - Software 3 06-19-2008 10:32 PM
IPTables Failing to Apply rustyz82 Linux - Software 3 05-01-2006 08:16 PM
eth1 failing on boot, IEEE firewire card driver failing, help jackuss_169 Linux - Laptop and Netbook 5 03-05-2005 07:34 AM
LILO install failing, Boot failing, but Installation fine. sramelyk Slackware 9 08-23-2003 02:37 PM
IPTables and a failing forwarding devscripts Linux - Networking 1 04-08-2003 09:00 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration