Traffic Accounting with Shorewall


Shorewall allows accounting of traffic with iptaccount, the following script inserts the output of iptaccount into a PostgreSQL Database. It does absolutely no input validation. In combination with cron this script allows accounting of traffic, if the intervals kept short the datatype can be changed from bigint to int.

The following is an example schema for the database.


Leave a Reply

Your email address will not be published. Required fields are marked *