Re: Rule matchup in iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 06, 2003 at 01:47:58PM +0100, Javier Miguel Rodr?guez wrote:
> VoIP) , so this is my question: Is there any way to know when a packet matches a rule? 
> -j LOG is not feasible (thousands of packets per second). I want something like this: 
> 
> Last two hours:
> 
> Rule 1: 15000 hits, 150 megabytes
> Rule 2: 3500 hits, 34 megabytes
> Rule 3: 9675 hits, 2 megabytes
> ad infinitum...

   iptables -nvL

The -v is the important bit here, you get 'packets' and 'bytes' counters
per rule then.  Adding -x will give exact byte numbers, rather than
summarising to K/M/G as the number grows.
  You can use -Z on a table to zero the counters when needed.

> 	Other question? How can I test iptables rules? In ipchains I
> could try them, but with iptables do I have to generate fake traffic?

  The only mention I can find of such in the man page is:

BUGS
       Check is not implemented (yet).

So I guess not.

-Ath
-- 
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
                  Finger athan(at)fysh.org for PGP key
	   "And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME

Attachment: pgp00366.pgp
Description: PGP signature


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux