Re: [SOLVED] Re: Native support of counting rules?

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

 



Hi,

why dont you use ...
iptables-save | grep "\-A" | wc -l

lg
~Jan


On 03/01/13 15:13, Aaron Lewis wrote:
> Already checked the manual on my system ... there's no counting
> support, the only thing relevant was --line-numbers,
> 
> My code is here, for anyone who needed
> 
> https://raw.github.com/CaledoniaProject/ipt_counting/master/ipt-count.c
> 
> I just hope one day such feature would be included officially.
> 
> 
> On Wed, Jan 2, 2013 at 9:58 PM, Eliezer Croitoru <eliezer@xxxxxxxxxxxx> wrote:
>> Hey Aaron,
>>
>> I feel kind of odd but this should answer you:
>> http://linux.die.net/man/8/iptables
>> www.garron.me/linux/iptables-manual.html
>>
>> Eliezer
>>
>>
>> On 1/2/2013 3:48 PM, Aaron Lewis wrote:
>>>
>>> Hi,
>>>      I want to know if I could get how many rules are present, i.e in
>>>      filter table?
>>>
>>>      Now I do `iptables -L | wc -l` like stuff, I know it's not right,
>>>      but iptables itself doesn't seem to count rules anyway.
>>>
>>>      I need this just to let user to know how many rules are present,
>>>      without root privileges, and now being able to view actual rules.
>>>
>>
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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