All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arthur Titeica <arthur@psw.ro>
To: Netfilter Users Mailing list <netfilter@vger.kernel.org>
Subject: nfacct + ipset usage
Date: Sun, 04 Nov 2012 20:03:36 +0200	[thread overview]
Message-ID: <8053765.UAHfcTIRLq@lhart> (raw)

Hello,

I'm trying to get some numbers regarding the usage of certain services (vnc 
and samba). For this I've created 2 accounting objects with nfacct and used 
the bellow iptables rules.

# nfacct add vnc-test
# nfacct add smb-test
# iptables -A FORWARD -m set --match-set test src \
                    -m set --match-set test dst \
                    -m nfacct --nfacct-name vnc-test \
                    -p tcp --dport 5900:5902

# iptables -A FORWARD -m set --match-set test src \
                    -m set --match-set test dst \
                    -m nfacct --nfacct-name smb-test \
                    -p udp -m multiport --dports 137,138

# iptables -A FORWARD -m set --match-set test src \
                    -m set --match-set test dst \
                    -m nfacct --nfacct-name smb-test \
                    -p tcp -m multiport --dports 139,445

However, something seems wrong as I get the same numbers for both objects:

{ pkts = 00000000000000040947, bytes = 00000000000036315309 } = vnc-test;
{ pkts = 00000000000000040947, bytes = 00000000000036315309 } = smb-test;

Is there something I'm missing?

nfacct v1.0.0
iptables v1.4.16.2
kernek 3.6.5

Thank you!

-- 
Arthur Titeica

                 reply	other threads:[~2012-11-04 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8053765.UAHfcTIRLq@lhart \
    --to=arthur@psw.ro \
    --cc=netfilter@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.