Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ip_tables for the 1000th time [solved] (I am soothed]
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
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 3:05 pm    Post subject: ip_tables for the 1000th time [solved] (I am soothed] Reply with quote

Ok, so I'm trying to get iptables running for what seems to be the 1000th time (this time with shorewall), and it just isn't happening. At first, I compiled ip_tables as a module, but that didn't work. So I just compiled it into the kernel itself, reemerged iptables, and tried starting shorewall, but guess what? For some reason, iptables complains that it can't find the module ip_tables:
Code:
mq# /etc/init.d/shorewall start
 * Starting firewall...
   Warning: Zone loc is empty
   Warning: Zone dmz is empty
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Module ip_tables not found.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/sbin/runscript.sh: line 532: 11854 Terminated              /sbin/shorewall start >/dev/null

Is there some way of telling iptables that the module isn't there anymore that I'm not aware of?
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word


Last edited by kamagurka on Thu Apr 21, 2005 12:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 4:17 pm    Post subject: Reply with quote

Did you forget to mount /boot after compile the new kernel? It's a common mistake. You can check the support for iptables of the current running kernel by doing this:

"zcat /proc/config.gz | grep _NF_"
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 4:35 pm    Post subject: Reply with quote

mekong wrote:
Did you forget to mount /boot after compile the new kernel? It's a common mistake. You can check the support for iptables of the current running kernel by doing this:

"zcat /proc/config.gz | grep _NF_"

I don't have a config.gz, but the kernel I compiled is definetely the one in /boot. I doublechecked that twice (I even compared the md5sums of the compiled image and my /boot/kernel)
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 4:53 pm    Post subject: Reply with quote

Do you use lilo or grub? Do you forget to change the config of grub or lilo to point to the new kernel? You can add config.gz option on menuconfig: General Setup -> Enable access to .config through /proc/config.gz It helps me a lot when I'm lacking of coffee and making those common mistakes. Good luck. :wink:
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 5:34 pm    Post subject: Reply with quote

thanks for the pointer to the config.gz thing. I am however *positive* that I am running on the kernel I compiled. It's really some other problem.
BTW: I recompiled ip_tables as a module, (it also shows up in lsmod), reemerged iptables repea#tedly, but still no go. The errormessage has changed a bit, tho:
Code:
mq# /etc/init.d/shorewall start     
 * Starting firewall...
   Warning: Zone loc is empty
   Warning: Zone dmz is empty
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/sbin/runscript.sh: line 532: 17097 Terminated              /sbin/shorewall start >/dev/null                                                              [ !! ]

_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 5:50 pm    Post subject: Reply with quote

Could you post your .config file?
Table filter support should be this line "CONFIG_IP_NF_FILTER=y"

On Menuconfig:
Device Drivers -> Networking support -> Networking options -> Network packet filtering -> IP: Netfilter Configuration -> Packet filtering [x]
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 6:02 pm    Post subject: Reply with quote

mekong wrote:
Could you post your .config file?
Table filter support should be this line "CONFIG_IP_NF_FILTER=y"

On Menuconfig:
Device Drivers -> Networking support -> Networking options -> Network packet filtering -> IP: Netfilter Configuration -> Packet filtering [x]

Well, I did not have that enabled, since I was told that iptables was all I needed; oh well.
Now the shorewall start looks like this:
Code:
mq# /etc/init.d/shorewall start
 * Starting firewall...
   Warning: Zone loc is empty
   Warning: Zone dmz is empty
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
/sbin/runscript.sh: line 532: 21534 Terminated              /sbin/shorewall start >/dev/null

At least now it seems to be doing something (mainly, block *all* traffic to and from my machine), but not what it's supposed to...
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 6:35 pm    Post subject: Reply with quote

Just select all options under IP: Netfilter Configuration, I'm sure you forget something shorewall need :twisted:
I can't get much info from the last error report. I don't know much about shorwall, can you generate the iptables rules with it then instead to run them all at once you run the iptables rule one by one? I can't guess which one kernel module shorewall need.
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 6:55 pm    Post subject: Reply with quote

Nope, that didn't help at all; I enabled everything (and I mean everything) in there, and nothing changes.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 7:07 pm    Post subject: Reply with quote

Iptables could be very tricky, it needs support on both kernel- and userland, so maybe you've enabled all the support in the kernel but not in the iptables program itself. Try to recompile iptables with this USE flag "extensions"
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 7:32 pm    Post subject: Reply with quote

mekong wrote:
Iptables could be very tricky, it needs support on both kernel- and userland, so maybe you've enabled all the support in the kernel but not in the iptables program itself. Try to recompile iptables with this USE flag "extensions"

Nope, it doesn't care about that either.
/me is crying now.
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
mekong
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2004
Posts: 93
Location: Rdam - NL - EU

PostPosted: Tue Apr 19, 2005 7:55 pm    Post subject: Reply with quote

Shorewall is sure complicated for a bash script which generate iptables rules :lol: I think you better type those iptables rules directly which may cost less time reading dozen of shorewall config files.

From shorewall website 8) http://www.shorewall.net/ErrorMessages.html :lol:

Code:
Iptables Error Messages

By far the most asked about iptables error message is:

iptables: No chain/target/match by that name

    This almost always means that you are trying to use a Shorewall feature that your iptables and/or kernel do not support. Beginning with version 2.2.0, Shorewall follows this message with a copy of the iptables command that is failing. Most commonly, the problem is that one of the match types (keyword following "-m" in the command) isn't supported by your iptables/kernel. The output of "shorewall check" shows you what your iptables/kernel support:

gateway:~# shorewall check
Loading /usr/share/shorewall/functions...
Processing /etc/shorewall/params ...
Processing /etc/shorewall/shorewall.conf...
Loading Modules...
Shorewall has detected the following iptables/netfilter capabilities:
   NAT: Available
   Packet Mangling: Available
   Multi-port Match: Available
   Extended Multi-port Match: Available
   Connection Tracking Match: Available
   Packet Type Match: Not available
   Policy Match: Available
   Physdev Match: Available
   IP range Match: Available
Verifying Configuration...

...
Back to top
View user's profile Send private message
kamagurka
Veteran
Veteran


Joined: 25 Jan 2004
Posts: 1026
Location: /germany/munich

PostPosted: Tue Apr 19, 2005 10:59 pm    Post subject: Reply with quote

Alright, this was really helpful. The first thing I did was to upgrade to the ~x86 version of shorewall, since it seems to serve up much better output. Then I ran a "shorewall check". Here's the interesting bits:
Code:
Shorewall has detected the following iptables/netfilter capabilities:
   NAT: Available
   Packet Mangling: Available
   Multi-port Match: Available
   Extended Multi-port Match: Not available
   Connection Tracking Match: Available
   Packet Type Match: Available
   Policy Match: Not available
   Physdev Match: Not available
   IP range Match: Available
[...]
Configuration Validated


Now, the damn thing still won't start, but at least now I'm told why:
Code:
iptables: No chain/target/match by that name
   ERROR: Command "/sbin/iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT" Failed
Processing /etc/shorewall/stop ...
iptables: No chain/target/match by that name
iptables: No chain/target/match by that name

BTW, the things that are "Not available", what do I have to do to make them available? I already looked in the menuconfig, but I can't find them...
_________________
If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Wed Apr 20, 2005 1:09 am    Post subject: Reply with quote

<*> Connection state match support CONFIG_IP_NF_MATCH_STATE
<*> Connection tracking match support CONFIG_IP_NF_MATCH_CONNTRACK

Make sure those are enabled in your kernel or compiled as modules:
Device Drivers -> Networking Support -> Networking Options -> Network packet filtering (replaces ipchains) -> IP Netfilter Configuration
_________________
http://get.a.clue.de
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