Take the 2-minute tour ×   I tried it using the following
iptables rule:  iptables -m mac -A INPUT -p all --mac-source
<mac-address> \! -s     share|improve this question  3 Answers 3
You may try iptraf. It's one of many. Also a much simpler way is
to use ifconfig <wifi_interface> and look at TX/RX bytes.  For a
solution with a little bit more state you may try vnStat
share|improve this answer What I need is something, that only
counts when I'm connected to this specific network. –  filmor
Jul 28 '11 at 5:51 You will need a little bit of scripting, but
vnstat will do the trick. You need to hook an ifup event to
enable vnstat for that interface when the ESSID is the one you
need to monitor, and an ifdown event to disable the accounting.
The ESSID of the current connection can be obtained with
iwconfig and a little of awk/sed/perl/etc. vnstat's parameters
--enable, --disable and --update will help you with the
accouting script. –  Pablo Castellazzi Jul 28 '11 at 18:45 Yes,
I've thought about that, but vnstat