Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Leonardo Rodrigues" <leolistas@solucoesip.net>
To: netfilter@lists.samba.org
Subject: Re: IP Traffic Accounting
Date: Sat, 22 Jun 2002 11:58:16 -0300	[thread overview]
Message-ID: <002d01c219fd$b2035ba0$3201a8c0@leonardo> (raw)
In-Reply-To: 20020622140903.YSRU2755.mta05-svc.ntlworld.com@there


    Usually, when you need to read traffic counters on iptables/ipchains,
you create what we called an 'accounting rule', that means, a rule that
matchs what you need it to match but it has NO action.

    example: iptables -A forward -p tcp --dport 25

this will create a rule that will only count packets/bytes and does not with
it. Of course if you need to allow/deny it, you'll need to deny/allow it
latter on another rule.

    So, if person has one rule for accounting and other for allow/deny the
packet, it can be counted YES in two different places. But this will happen
ONLY IF we have an accounting rule for it, that means, a rule that does
nothing but count the packet.

    If you're getting the counters directly on the ACCEPT/DENY rule, you'll
really dont have problems on packets being counted twice, because after
reaching the accept/deny rule packet will stop trying to be matched on other
rules.

    Sincerily,
    Leonardo Rodrigues

----- Original Message -----
From: "Antony Stone" <Antony@Soft-Solutions.co.uk>
To: <netfilter@lists.samba.org>
Sent: Saturday, June 22, 2002 11:09 AM
Subject: Re: IP Traffic Accounting


>
> I'm not sure I agree with this - I believe the byte / packet counters only
> count packets matched by the rule, so that if you have the rules:
>
> iptables -A FORWARD -p tcp --dport 25 -j ACCEPT
> iptables -A FORWARD -p tcp --dport 110 -j ACCEPT
>




  reply	other threads:[~2002-06-22 14:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-22 14:02 IP Traffic Accounting yomega
2002-06-22 14:00 ` David B Harris
2002-06-22 14:09   ` Antony Stone
2002-06-22 14:58     ` Leonardo Rodrigues [this message]
2002-06-22 15:18     ` AW: IP Traffic Accounting / Own Chains yomega
2002-06-22 15:18       ` Antony Stone
2002-06-22 15:35         ` AW: " yomega
2002-06-22 14:03 ` IP Traffic Accounting Antony Stone
2002-06-24  3:50 ` Jason R. Martin
2002-06-24  5:42   ` Michael
2002-06-24 10:33     ` Antony Stone
2002-06-24 12:27       ` Michael
2002-06-24 12:27       ` Michael
2002-06-24 15:33     ` Jason R. Martin
2002-06-24 16:41       ` Ramin Alidousti

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='002d01c219fd$b2035ba0$3201a8c0@leonardo' \
    --to=leolistas@solucoesip.net \
    --cc=netfilter@lists.samba.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