Re: How to account traffic in IPTABLES?

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

 



Bobo wrote:

> HI
>
>      I use the iptables + squid as the gateway of one LAN,and it is very good in fact.
>
>   Now,I would like to get the traffic accounting of each IP of the LAN.
>
>  How to get these data ? Does IPtables contain these data?
>  
>

try this one:

iptables -nvL INPUT

>  Are there some tools for traffic accounting of iptables?
>  
>

The iptables command itself !!!

>  I could use perl and shell programing.Could I analyze the log file of iptables to account?
>  
>

in Perl:

open(CHAINS, "iptables -nvL INPUT|") or die "Error reading chains\n";

while(<CHAINS>)
{
# read the lines one by one, matching on the text you want
}

close(CHAINS);

>  Thanks
>
>
>
>
>
>  
>





[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