I would like to be able to count the number of bytes going to a given MAC address using iptables or ebtables or some other linux utility. I have tried looking at the byte counts in ebtables but they are always 0, am I doing something wrong here?

link|improve this question

67% accept rate
feedback

1 Answer

IPTables supports traffic accounting. You should just be able to setup an IPtables rule matching the mac address you are interested in, then look at it's counters to see what kind of traffic it's pushing. Note that you can't use this to look at traffic for other machines on the LAN, it will only be for traffic to or from the machine it's running on.

link|improve this answer
I'm running the machine as a firewall so it will have packets destined for other MAC addresses, but IPtables only has a source MAC address option, not a destination one. – DanieL Nov 21 '11 at 23:56
Do you need this to be command line based? unix4lyfe.org/darkstat will do this all for you, and works very very nicely when run on a firewall. – devicenull Nov 22 '11 at 0:04
Unfortunately it does need to be command line based. – DanieL Nov 22 '11 at 0:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.