* 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 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
0 siblings, 1 reply; 5+ messages in thread
From: Amos Jeffries @ 2011-01-15 13:36 UTC (permalink / raw)
To: netfilter
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.
For example:
iptables -v -L POSTROUTING
will display the whole table and counters for all rules in it
AYJ
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: get byte count per rule and ip address
2011-01-15 13:36 ` Amos Jeffries
@ 2011-01-15 14:15 ` Jan Engelhardt
0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2011-01-15 14:15 UTC (permalink / raw)
To: Amos Jeffries; +Cc: netfilter
On Saturday 2011-01-15 14:36, Amos Jeffries 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.
>
> For example:
> iptables -v -L POSTROUTING
>
> will display the whole table and counters for all rules in it
Better use iptables-save -c for that.
^ 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
* 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, 0 replies; 5+ messages in thread
From: Mamadou Touré @ 2011-01-15 16:41 UTC (permalink / raw)
To: Jan Engelhardt, netfilter
Thank you for your reply could you give me more detail about xt_ACCOUNT.
regards.
2011/1/15 Jan Engelhardt <jengelh@medozas.de>:
> 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