From: Chris Brenton <cbrenton@chrisbrenton.org>
To: netfilter <netfilter@lists.netfilter.org>
Subject: Re: tracking usage by mac address
Date: Mon, 30 Aug 2004 06:17:12 -0400 [thread overview]
Message-ID: <1093861031.1660.30.camel@grendel> (raw)
In-Reply-To: <41329413.3080407@shaw.ca>
On Sun, 2004-08-29 at 22:42, Henry Baxter wrote:
>
> Ultimately I am hoping to track the bandwidth usage of about 50 client
> computers through my router based on their MAC address. I understand
> that by simply writing a rule that does nothing to the packet, such as
> 'iptables -A FORWARD -m <mac address>' I can parse the netfilter log and
> find out what I need.
How about:
iptables -A FORWARD -m mac --mac-source <mac address 1> -j LOG "
CLIENT_1 "
iptables -A FORWARD -m mac --mac-source <mac address 2> -j LOG "
CLIENT_2 "
Then when you need a report, just run:
iptables -L -nvx
Now the caveat is this will only show you outbound traffic, not inbound.
In other words, there is no "--mac-destination" option so you can't log
reply packets based on MAC address. Kind of a bummer in your case
because if these clients are mostly downloading data, that's the
direction that's going to see the most bandwidth usage.
Two options:
1) Log by IP instead of MAC (maybe hand the clients fixed IP's via DHCP)
2) Use ebtables instead of iptables (90% certain it will work but have
not tried it)
HTH,
C
next prev parent reply other threads:[~2004-08-30 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 2:42 tracking usage by mac address Henry Baxter
2004-08-30 10:17 ` Chris Brenton [this message]
2004-08-30 11:34 ` Torsten Luettgert
2004-08-30 13:12 ` George Alexandru Dragoi
2004-08-30 18:54 ` Jose Maria Lopez
2004-08-30 20:37 ` George Alexandru Dragoi
2004-08-31 0:34 ` Henry Baxter
2004-08-31 19:52 ` Jose Maria Lopez
2004-08-31 19:52 ` Jose Maria Lopez
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=1093861031.1660.30.camel@grendel \
--to=cbrenton@chrisbrenton.org \
--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