Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Stephane Ouellette <ouellettes@videotron.ca>
To: Bobo <boboaq@163.com>
Cc: "netfilter-devel@lists.netfilter.org"
	<netfilter-devel@lists.netfilter.org>,
	"netfilter@lists.netfilter.org" <netfilter@lists.netfilter.org>
Subject: Re: How to account traffic in IPTABLES?
Date: Mon, 31 Mar 2003 12:10:29 -0500	[thread overview]
Message-ID: <3E887685.9070000@videotron.ca> (raw)
In-Reply-To: 20030330134802.CF9351C462B39@sm204.163.com

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
>
>
>
>
>
>  
>





  parent reply	other threads:[~2003-03-31 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-30 13:47 How to account traffic in IPTABLES? Bobo
2003-03-30 21:02 ` Steven Schmidt
2003-03-31 17:10 ` Stephane Ouellette [this message]
2003-04-07 16:34   ` Raymond Leach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E887685.9070000@videotron.ca \
    --to=ouellettes@videotron.ca \
    --cc=boboaq@163.com \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox