From: Joel Newkirk <netfilter@newkirk.us>
To: marco_simon@web.de, netfilter@lists.netfilter.org
Subject: Re: Using iptables for bandwidth mesurement
Date: Wed, 8 Jan 2003 04:03:11 -0500 [thread overview]
Message-ID: <200301080403.11273.netfilter@newkirk.us> (raw)
In-Reply-To: <ID0NVT4YQPJ4WB6TSIMGSLF8632.3e195dc8@europe>
On Monday 06 January 2003 05:43 am, Marco Simon wrote:
> Hello netfilter-group,
>
> we are using iptables on our gateway-server for doing NAT and
> package-filtering.
>
> Actually one of our hosting-customers wants to be informed how much
> off of our bandwidth to the internet (1.5 MBit maximum) is used, in
> order to avoid that some of his "homepage - guests" are not able
> visite his site due lack of bandwidth. Is there any way, how I can use
> IPtables for giving him a report about the bandwith usage ? e.g. how
> can I get the current bandwidth - usage on a special interface ?
>
> The other point we need, is an report about the traffic which comes up
> between our cusomers web-server (which is inside our lan, packages
> will have to pass the firewall) and the outside-world. How can I set
> up such a service using iptalbes ??
>
> Thanks for any comment !
Look into software packages that are addressed through the ULOG target to
perform detailed accounting of traffic. There are several available,
IIRC, which can sift, sort, and map the data collected on all the
traffic through the firewall, so long as you set an appropriate "-j
ULOG" rule.
A quick and dirty answer to part two is to use "iptables -L -v -n" and a
rule at the start of your FORWARD chain which does nothing but match ALL
traffic outbound from that customer's server, but has no target. The
rule will then count packets and bytes but not actually DO anything.
This is NOT a good solution, but you can use it for rough numbers over a
short period. (if the firewall is reset, or the counts reset, then
everything is lost) Just zero the counts, (iptables -Z, or iptables -Z
FORWARD) and after a period of time list the rules with "-v" and check
the packet and byte counts. If you want to try this without zeroing all
counts, just remove and reinsert the rule.
j
next prev parent reply other threads:[~2003-01-08 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-06 10:43 Using iptables for bandwidth mesurement Marco Simon
2003-01-08 9:03 ` Joel Newkirk [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-05 12:42 Marco_Simon
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=200301080403.11273.netfilter@newkirk.us \
--to=netfilter@newkirk.us \
--cc=marco_simon@web.de \
--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