IPAC-NG is the iptables/ipchains-based IP
accounting package for Linux. It collects,
summarizes, and nicely displays IP accounting
data. Ipchains and (preferably) iptables are
supported. Logs are stored in files, a gdbm
database, or a PostgreSQL database.