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 isn't able to tell local from interwebs traffic, is it? –  filmor Jul 30 '11 at 5:16

You could also try looking at ntop and/or webalizer. They are good network monitoring tools. They give detailed information of what each computer on the network is doing, which sites its visiting and how much bandwidth its using. Hope that helps to solve the problem of what you are looking for.

share|improve this answer

Try Wireshark.

It has a ESSID filter for capturing from specific networks, and a lot of options if you need more than basic capturing.

If you need CLI, you can try tcpdump, but make sure to read it's man page.

share|improve this answer

Your Answer


