Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-11-2004, 04:55 PM   #1
LQ Newbie
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
Question iptables traffic accounting for each IP/MAC

hi all,

how to count traffic for each IP/MAC in my network with iptables/linux gateway.


iptables -N clients
iptables -A FORWARD -j clients

iptables -A clients -s -m mac --mac-source 00:30:1B:AB:F6:83
iptables -A clients -s -m mac --mac-source 00:30:1B:AB:F6:84

but then if I download 1.2meg file on I get:

bash-2.05b# iptables -L FORWARD -vn
Chain FORWARD (policy ACCEPT 7045 packets, 6258K bytes)
pkts bytes target prot opt in out source destination
1408 1251K clients all -- * *

total FORWARD is OK, but it's total for all clients not only

bash-2.05b# iptables -L clients -vn
Chain clients (1 references)
pkts bytes target prot opt in out source destination
553 22411 all -- * * MAC 00:30:1B:AB:F6:83
0 0 all -- * * MAC 00:30:1B:AB:F6:84

and chain clients shows 22411bytes for this client ( How can I count traffic for each client and not only total.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IP Traffic accounting varun_saa Mandriva 0 02-26-2005 05:13 AM
IP-Accounting by iptables? TobyD Linux - Networking 2 11-15-2004 06:59 PM
traffic accounting? how? sciobanu Linux - Networking 4 07-08-2004 11:09 AM
iptables accounting rules petrax Linux - Networking 1 11-10-2003 09:09 PM
Traffic accounting...? Gorbachov Linux - Software 2 09-23-2003 07:16 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration