What I did to monitor ~10 users on my OpenWrt
Installed pivot overlay with a USB stick, as my router's storage is too small to install the packages and store the bandwidth data. wiki.openwrt.org/doc/howto/extroot
Installed luci-app-statistics with collectd-mod-iptables. wiki.openwrt.org/doc/howto/luci_app_statistics
Setup a custom iptables settings;
iptables -N TRAFFIC_ACCT_IN
iptables -N TRAFFIC_ACCT_OUT
iptables -I FORWARD -i pppoe-wan -j TRAFFIC_ACCT_IN
iptables -I FORWARD -o pppoe-wan -j TRAFFIC_ACCT_OUT
iptables -A TRAFFIC_ACCT_IN --dst 192.168.1.150 -m comment --comment "user1-in"
iptables -A TRAFFIC_ACCT_OUT --src 192.168.1.150 -m comment --comment "user1-out"
Setup Static Leases for clients; MAC 00:11:22:33:44:FF -> 192.168.1.150
Setup collectd-mod-iptables rule; name: user1-in options: user1-in
Point luci-app-statistics database to a folder in USB
That should be it, also check this out, I've learnt from there; catonmat.net/blog/traffic-accounting-with-iptables
edit: add-usb
(Last edited by Kitin on 26 Nov 2016, 20:25)