Linux Netfilter discussions
 help / color / mirror / Atom feed
From: John Haxby <john.haxby@oracle.com>
To: Michael Nguyen <iptables@twentyten.org>
Cc: netfilter@vger.kernel.org
Subject: Re: iptables for bandwidth tracking
Date: Wed, 06 Jan 2010 12:13:02 +0000	[thread overview]
Message-ID: <4B447E4E.2060505@oracle.com> (raw)
In-Reply-To: <4B44078D.4000103@twentyten.org>

On 06/01/10 03:46, Michael Nguyen wrote:
>
> - Using one of the many libpcap daemons to monitor and record traffic 
> patterns
> - Use iptables
>
> Each VPN node has the possibility of 64,000 IP addresses so if I used 
> iptables, I'd need to create iptables rules for each of those IP 
> addresses.  That seems silly to me, but am I better off doing that 
> than running a daemon that at the end of the day will basically do the 
> same thing?  Thanks in advance.

Are those 64K addresses all in one subnet?   Then something like

     iptables -A FORWARD -s 10.0.0.0/16 -j node1
     iptables -A FORWARD -d 10.0.0.0/16 -j node1
     iptables -A FORWARD -s 10.1.0.0/16 -j node2
     ... and so on

Then you can just collect the stats as and when you feel the need.

The advantage of that is that it's very easy to do and has very little 
performance impact (I believe).

On the other hand, the various libpcap daemons that I came across when I 
was looking for something for home might be better suited to what you're 
after.

jch

  reply	other threads:[~2010-01-06 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  3:46 iptables for bandwidth tracking Michael Nguyen
2010-01-06 12:13 ` John Haxby [this message]
2010-01-06 13:34 ` Mart Frauenlob

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=4B447E4E.2060505@oracle.com \
    --to=john.haxby@oracle.com \
    --cc=iptables@twentyten.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox