Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Ip accounting Help
Date: Wed, 23 Jun 2004 10:01:24 +0100	[thread overview]
Message-ID: <200406231001.24925.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <1087962571.2041.10.camel@joel.d2visp.com>

On Wednesday 23 June 2004 4:49 am, Joel wrote:

> Hi all,
>
> Currently I am working on Ip accounting in linux.
> My system is Redhat 9.0 with iptables v1.2.7a
> This redhat is doing Squid-Caching/ Nat/ Bandwidth management with tc/
> Real ip forwarding.
>
> I want to do Ip accounting of upload and download. I want to know how
> much per ip bandwidth consumption is ?
>
> As i m doing source nat and Real ip forwarding, FORWARD chain will have
> bytes counters. So FORWARD chain will give the correct figure of how
> much the ip has used the bandwidth ???

Beware of trying to do this if you are using the stateful connection tracking 
of netfilter (iptables -I FORWARD -m state --state ESTABLISHED,RELATED), 
because if you are, then almost all of the packets going through the machine 
(specifically, all except the first one of each connection) will be processed 
by this one rule, and all the other rules in the FORWARD chain will only see 
one packet per connection (the first one).

You may be able to do what you want using the mangle table of the FORWARD 
chain, but not with the default filter table.

Regards,

Antony.

-- 
I own three Windows books, published by O'Reilly.   They are "Windows 
Annoyances", "Office 97 Annoyances" and "Windows 98 Annoyances".   That 
pretty much sums it up for me.

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-06-23  9:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23  3:49 Ip accounting Help Joel
2004-06-23  9:01 ` Antony Stone [this message]
2004-06-23 10:57   ` Joel
2004-06-23 11:41     ` Antony Stone
2004-06-24  3:29       ` Joel Solanki
2004-06-25 11:27       ` Joel Solanki
2004-06-26  4:30       ` Ip accounting Help--> Urgent Joel Solanki
2004-06-26  8:22         ` Antony Stone
2004-06-26  8:33           ` Askar Ali Khan
2004-06-26  9:20           ` Joel Solanki
2004-06-26  9:29             ` Antony Stone
2004-06-26  9:55               ` Joel Solanki
2004-06-26 10:23               ` Joel Solanki
2004-06-26 11:16                 ` Antony Stone
2004-06-26 11:40                   ` Joel Solanki
2004-06-23  9:16 ` Ip accounting Help Dharmendra T.

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=200406231001.24925.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --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