Ok so I've got Debian and 2 network cards on a small box to get a router running. The routing and firewall part I can find on my own but the usage part I can't figure out. I'll be updating a SQL database every minute with MAC address usage (upload and download). So all traffic passing through let's say interface eth1 will have to be counted by to what MAC it goes to or what MAC it's coming from depending on if it's incoming traffic or outgoing. I want to do this with IPTABLES. I'll have to create chains with each MAC address and a rule to only accept traffic to and from specific MAC addresses.