Linux Netfilter discussions
 help / color / mirror / Atom feed
* iptables -L *very* slow
@ 2003-02-17  5:36 Jean-Christian Imbeault
  2003-02-17  6:25 ` Joel Newkirk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jean-Christian Imbeault @ 2003-02-17  5:36 UTC (permalink / raw)
  To: netfilter

When I try and print out my iptable rules using iptables -L, it takes 
about three minutes for the rules to print out (and there are only 9 of 
them).

Why is does this take so long? Is this a bug?

I am using the newest version of iptables with a custom 2.4.20 kernel.

Thanks!

jc



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: iptables -L *very* slow
@ 2003-02-17  6:14 Eugene Joubert
  0 siblings, 0 replies; 6+ messages in thread
From: Eugene Joubert @ 2003-02-17  6:14 UTC (permalink / raw)
  To: 'Jean-Christian Imbeault', netfilter

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

Try using iptables -n -L "whatever"

It may be trying to do reverse lookups.

Hope this helps

-----Original Message-----
From: Jean-Christian Imbeault [mailto:jc@mega-bucks.co.jp] 
Sent: 17 02 2003 07:36 AM
To: netfilter@lists.netfilter.org
Subject: iptables -L *very* slow


When I try and print out my iptable rules using iptables -L, it takes 
about three minutes for the rules to print out (and there are only 9 of 
them).

Why is does this take so long? Is this a bug?

I am using the newest version of iptables with a custom 2.4.20 kernel.

Thanks!

jc


[-- Attachment #2: Type: text/html, Size: 1294 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: iptables -L *very* slow
  2003-02-17  5:36 iptables -L *very* slow Jean-Christian Imbeault
@ 2003-02-17  6:25 ` Joel Newkirk
  2003-02-17  6:30 ` Arnt Karlsen
  2003-02-17  7:34 ` Chris Barnes
  2 siblings, 0 replies; 6+ messages in thread
From: Joel Newkirk @ 2003-02-17  6:25 UTC (permalink / raw)
  To: Jean-Christian Imbeault, netfilter

On Monday 17 February 2003 12:36 am, Jean-Christian Imbeault wrote:
> When I try and print out my iptable rules using iptables -L, it takes
> about three minutes for the rules to print out (and there are only 9
> of them).
>
> Why is does this take so long? Is this a bug?
>
> I am using the newest version of iptables with a custom 2.4.20 kernel.

You'll probably have nearly instant listing with "iptables -n -L".  My 
guess is that it is taking all that time trying to resolve IP's in your 
rules to actual hostnames.  That lookup process is bypassed with the 
"-n" switch, to use numbers instead of names.

The root cause is a little deeper.  Either an IP cannot be resolved, or 
it is taking an unusually long time to resolve.  The latter might be 
caused by flawed DNS configuration at your end, or at the DNS for the 
machine in question.

j



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: iptables -L *very* slow
  2003-02-17  5:36 iptables -L *very* slow Jean-Christian Imbeault
  2003-02-17  6:25 ` Joel Newkirk
@ 2003-02-17  6:30 ` Arnt Karlsen
  2003-02-17  7:34 ` Chris Barnes
  2 siblings, 0 replies; 6+ messages in thread
From: Arnt Karlsen @ 2003-02-17  6:30 UTC (permalink / raw)
  To: netfilter

On Mon, 17 Feb 2003 14:36:15 +0900, 
Jean-Christian Imbeault <jc@mega-bucks.co.jp> wrote in message 
<3E5074CF.90904@mega-bucks.co.jp>:

> When I try and print out my iptable rules using iptables -L, it takes 
> about three minutes for the rules to print out (and there are only 9
> of them).
> 
> Why is does this take so long? Is this a bug?

..no, a feature, it shows you you have bad resolving too.

..compare with 'iptables -nL'.  ;-)
 
> I am using the newest version of iptables with a custom 2.4.20 kernel.
> 
> Thanks!
> 
> jc
> 
> 


-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: iptables -L *very* slow
  2003-02-17  7:34 ` Chris Barnes
@ 2003-02-17  7:32   ` Jean-Christian Imbeault
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christian Imbeault @ 2003-02-17  7:32 UTC (permalink / raw)
  Cc: Netfilter

Thanks to all for pointing out the -n flag to me :) Now if I can just 
figure out why my rules keep disappearing ....

Jc



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: iptables -L *very* slow
  2003-02-17  5:36 iptables -L *very* slow Jean-Christian Imbeault
  2003-02-17  6:25 ` Joel Newkirk
  2003-02-17  6:30 ` Arnt Karlsen
@ 2003-02-17  7:34 ` Chris Barnes
  2003-02-17  7:32   ` Jean-Christian Imbeault
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Barnes @ 2003-02-17  7:34 UTC (permalink / raw)
  To: Netfilter

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

I get the same thing when i list my rules. it used to happen to me with
ipchains as well.

I think the others are right when they say that its trying to resolve
the addresses but it might not necessarily mean that you have a faulty
DNS.

alot of my rules dont specify 1 host, they specify a subnet and it still
takes time for iptables to list the rules...

it might be a small bug that iptables is trying to lookup the name for a
subnet address...i thought it would be a little smarter to know that
10.3.2.0/24 isn't a host rather a subnet and therefore shouldn't try to
do a lookup...

anyway, do what the others suggested

ipchains -nL


On Mon, 2003-02-17 at 16:36, Jean-Christian Imbeault wrote:
> When I try and print out my iptable rules using iptables -L, it takes 
> about three minutes for the rules to print out (and there are only 9 of 
> them).
> 
> Why is does this take so long? Is this a bug?
> 
> I am using the newest version of iptables with a custom 2.4.20 kernel.
> 
> Thanks!
> 
> jc
> 
> 


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-02-17  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-17  5:36 iptables -L *very* slow Jean-Christian Imbeault
2003-02-17  6:25 ` Joel Newkirk
2003-02-17  6:30 ` Arnt Karlsen
2003-02-17  7:34 ` Chris Barnes
2003-02-17  7:32   ` Jean-Christian Imbeault
  -- strict thread matches above, loose matches on Subject: below --
2003-02-17  6:14 Eugene Joubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox