LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-26-2008, 11:24 AM   #1
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Rep: Reputation: 15
iptables suddenly will not start


Hi,

Running Fedora 9 from RedHat.

I have a bash script (set up as a cron job) that restarts my iptables firewall each day. This morning, I checked my mail to find that it wouldn't start. When I tried to run iptables manually just to find out which firewall rules were in place, I got the following:

/root#whereis iptables
iptables: /sbin/iptables /lib/iptables /usr/share/man/man8/iptables.8.gz
/root#/sbin/iptables -L
iptables v1.4.0: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/root#yum -y update
Loaded plugins: refresh-packagekit
Setting up Update Process
No Packages marked for Update
/root#

Huh? I don't know what insmod is, so I looked into it and found the following link:

http://linux.about.com/od/commands/l/blcmdl8_insmod.htm

...but I don't see how that has anything to do with my problem. This is a man page for installing kernel modules, and iptables is already isntalled according to the output above...or whereis wouldn't have found it. And the firewall script launched and ran iptables perfectly every day for literally YEARS prior to this morning. Why is it suddenly claiming "iptables who"? And as you can see, I'm running the latest kernel version - the yum command would have remedied this if I wasn't.

My cron job also runs the yum command each night, and it's possible that it may have picked up something-or-other which changed the system configuration, but I cannot imagine what.

I take it this means my firewall is down...?

Any ideas on fixing this would be appreciated.

Thanks, Matt
 
Old 06-27-2008, 08:21 PM   #2
eagleheart
Member
 
Registered: Apr 2007
Location: Athens, Georgia, USA
Distribution: kubuntu 12.04, centos 6.3
Posts: 31

Rep: Reputation: 16
post the output of

lsmod |sort
 
Old 06-28-2008, 11:48 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 774

Rep: Reputation: 242Reputation: 242Reputation: 242
iptables is the user-land side of Netfilter, the other part being the in-kernel code. You get weird messages like these when iptables (the user-land part) and the kernel code that provides the actual support don't match up. iptables should be built to match whatever kernel is current. On a distro system, my guess is these match up/are shipped out together. The actual module that provides the filter part I believe is "iptable_filter", as seen here:

Code:
ipt_MASQUERADE          3328  1
iptable_nat             6664  1
nf_nat                 17424  2 ipt_MASQUERADE,iptable_nat
ipt_REJECT              3712  18
xt_comment              1792  7
xt_multiport            2944  7
ipt_LOG                 5248  45
xt_limit                2432  45
nf_conntrack_ipv4      16008  5 iptable_nat,nf_nat
xt_state                2432  2
nf_conntrack           57488  5 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state
iptable_filter          3328  1
xt_iprange              2432  40
You shouldn't ever have to touch 'insmod'. Usually the kernel auto-loads what it needs, but you could do 'modprobe iptable_filter' and it might give you a better error message.

See if you have all the kernel modules for iptables (your kernel version will probably be different):

/lib/modules/2.6.25.9/kernel/net/ipv4/netfilter/ <-- should be a bunch of kmods in there
/usr/lib/iptables/ <-- and solibs in there


If you do have all that, then my next guess is that the user-land and the kernel code parts of iptables/netfilter are out of sync/don't match up.
 
  


Reply



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
apache2 suddenly wont start SimbaSpirit Linux - Software 4 03-04-2008 05:52 AM
Fluxbox suddenly very slow to start. Tomermory Linux - General 4 02-04-2008 11:26 PM
Xfce4 suddenly doesn't start properly trevelluk Linux - Software 1 10-23-2005 12:50 PM
start menu has suddenly changed pomelo Mandriva 3 11-21-2003 03:24 PM
suddenly apachectl (2.0.47) wont start latino Linux - Networking 3 08-28-2003 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:27 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
Open Source Consulting | Domain Registration