I've created some scripts/solution for accounting OVPN clients.
This is simple statistics gathering & processing tool/script that will allow
me to with quite good precision maintain accounting for OpenVPN clients
using m0n0 as Internet gateway. All is done on the same box as m0n0 is
At each client-disconnect event from OpenVpn server it writes to
temporary (on RAM) file stats for a client.
Each 30000 seconds it parse temporary log file and move the data do
Data is stored inside config file - so it is easy to do upgrades etc..
It allows processing at user click, and displays: bytes in, bytes out,
total bytes, connections count.
All done at monthly basis.
All stuff is published at patryk.pl/wall .
Hope you will find this usefull.
Many thanks go to Manuel (for M0n0) and Peter that keeps OVPN at m0n0 box.