openwrt-capmon: Per-Client Bandwidth Caps on OpenWrt
When an OpenWrt router sits on a metered or capped connection, per-client usage data is not a nice-to-have, it is the difference between knowing which device blew the quota and guessing. openwrt-capmon is a small package that tracks per-client internet usage and enforces data plans directly on the router, without shipping the data to a cloud dashboard.
Why per-client accounting belongs on the router
Most traffic monitoring assumes a downstream collector: a Raspberry Pi running Grafana, or a cloud service pulling SNMP. That works, but it adds a box, a database, and a network path that can fail. On a single router, the kernel already sees every packet. Reading connection tracking data and aggregating it per MAC or IP is cheap, and it keeps the accounting local even when the WAN link is down.
Cloud dashboards tell you what your traffic did last week. On-router accounting tells you which device is eating the quota right now.
openwrt-capmon hooks into the router’s firewall and connection tracking to attribute bytes to clients, then applies plan limits you define. It is the kind of tool that belongs on a small office or home network where one or two devices are responsible for most of the consumption and nobody wants to argue about it later. Setup is a package install and a config file:
# Install on OpenWrt and enable per-client accounting
opkg update
opkg install openwrt-capmon
/etc/init.d/capmon enable
/etc/init.d/capmon start
The trade-off is visibility depth. It will not give you application-layer breakdowns or historical graphs out of the box; it gives you counters and limits, which is what a cap actually needs. If you want full flow analysis, pair it with a separate collector. For a lightweight, self-hosted way to keep a metered link honest, the source is fullband7/openwrt-capmon on GitHub.