Linux Netfilter discussions
 help / color / mirror / Atom feed
* limit match log question
@ 2003-04-30 14:52 Frank Smith
  2003-04-30 15:13 ` Maciej Soltysiak
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Smith @ 2003-04-30 14:52 UTC (permalink / raw)
  To: Netfilter

If you are using the limit match to control the number of log entries, is
there any way to also show the number of matches?  Something like syslog's
ability to combine repeated events into 'last message repeated 2318 times'.
   For example, if I limit logging of a match to 1 per 5 seconds to avoid
log flooding, I can't easily tell if I'm dropping 1 packet per 5 seconds
or 1000.  Or is there some option or patch to do this that I just haven't
noticed?

Frank


--
Frank Smith                                             fsmith@hoovers.com
Systems Administrator                                  Voice: 512-374-4673
Hoover's Online                                          Fax: 512-374-4501


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

* Re: limit match log question
  2003-04-30 14:52 limit match log question Frank Smith
@ 2003-04-30 15:13 ` Maciej Soltysiak
  2003-04-30 15:39   ` Frank Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Soltysiak @ 2003-04-30 15:13 UTC (permalink / raw)
  To: Frank Smith; +Cc: Netfilter

Hi,

> If you are using the limit match to control the number of log entries,
> is there any way to also show the number of matches?
Yes,

# iptables -L -nv

-v option will show the number of packets that has hit the rule.

Regards,
Maciej Soltysiak



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

* Re: limit match log question
  2003-04-30 15:13 ` Maciej Soltysiak
@ 2003-04-30 15:39   ` Frank Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Smith @ 2003-04-30 15:39 UTC (permalink / raw)
  To: Maciej Soltysiak; +Cc: Netfilter

--On Wednesday, April 30, 2003 17:13:50 +0200 Maciej Soltysiak <solt@dns.toxicfilms.tv> wrote:

>> If you are using the limit match to control the number of log entries,
>> is there any way to also show the number of matches?
> Yes,
>
># iptables -L -nv
>
> -v option will show the number of packets that has hit the rule.

Thanks for the reply, but it seems I wasn't clear on my question.  I was
looking for a way to get the number logged, so when the log entry was
written it would contain the number of matches that occurred during the
log limit interval.  If the log limit interval were set to 5 seconds, and
it got 1000 matches in that 5 seconds, the log entry would contain the
number 1000 in it somewhere.
   It seemed to me like a useful extension that would enable you to reduce
log file sizes while still providing data on the frequency of events. Getting
the counters from iptables on the command line is helpful for seeing what's
going on right now, but doesn't help if you want data from some time in the
past.

Frank

--
Frank Smith                                             fsmith@hoovers.com
Systems Administrator                                  Voice: 512-374-4673
Hoover's Online                                          Fax: 512-374-4501


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

end of thread, other threads:[~2003-04-30 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30 14:52 limit match log question Frank Smith
2003-04-30 15:13 ` Maciej Soltysiak
2003-04-30 15:39   ` Frank Smith

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