Linux Netfilter discussions
 help / color / mirror / Atom feed
* get byte count per rule and ip address
@ 2011-01-15 12:09 Mamadou Touré
  2011-01-15 13:36 ` Amos Jeffries
  0 siblings, 1 reply; 5+ messages in thread
From: Mamadou Touré @ 2011-01-15 12:09 UTC (permalink / raw)
  To: netfilter

Hi, all
i've these rule :
r1 : iptables  -t mangle  -A POSTROUTING     -m layer7 --l7proto  bgp
-j MARK --set-mark 1
r2 : iptables  -t mangle  -A POSTROUTING     -m layer7 --l7proto  biff
 -j MARK --set-mark 2

for both r1 and r2 I'd like to get the byte count of packets that have
match rules.
also i'd like to get byte count of packets according to the IP address.
I need your help plz.
regards.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: get byte count per rule and ip address
@ 2011-01-15 14:41 Jan Engelhardt
  2011-01-15 16:41 ` Mamadou Touré
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2011-01-15 14:41 UTC (permalink / raw)
  To: Mamadou Touré; +Cc: netfilter

Don't strip the Cc list.

On Saturday 2011-01-15 15:20, Mamadou Touré wrote:
>
>>> On 16/01/11 01:09, Mamadou Touré wrote:
>>>> Hi, all
>>>> i've these rule :
>>>> r1 : iptables  -t mangle  -A POSTROUTING     -m layer7 --l7proto  bgp
>>>> -j MARK --set-mark 1
>>>> r2 : iptables  -t mangle  -A POSTROUTING     -m layer7 --l7proto  biff
>>>>  -j MARK --set-mark 2
>>>>
>>>> for both r1 and r2 I'd like to get the byte count of packets that have
>>>> match rules.
>>>> also i'd like to get byte count of packets according to the IP address.
>>>> I need your help plz.
>>>
>>> -v shows the packet counters and extra details.
>>>  iptables -v -L POSTROUTING
>>
>> Better use iptables-save -c for that.
>
>OK.
>but how do I get packet count for an IP address.
>thet problem is that I don't know exactly the IP that passthrough the box.
>regards.

Use something like xt_ACCOUNT.

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

end of thread, other threads:[~2011-01-15 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-15 12:09 get byte count per rule and ip address Mamadou Touré
2011-01-15 13:36 ` Amos Jeffries
2011-01-15 14:15   ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2011-01-15 14:41 Jan Engelhardt
2011-01-15 16:41 ` Mamadou Touré

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