Try something with cron and tcpdump. There are numerous ip accounting programs out there. Look on the Debian package list.
+-------------------------------------------------------------------+ | -=I T ' S P R I N C I P L E T H A T C O U N T S=- | |=- -=ALAN KEYES FOR PRESIDENT=- -=| | Balanced Budgets Personal Freedoms Morality Lower Tax | |=-- http://www.Keyes2000.com. --=| +———————————————————————————————————————————————————————————————————+