Kristopher Lalletti
2002-Feb-23 18:30 UTC
[Shorewall-devel] IP accounting counters on iptables
I''ve been muddling around to find the "ideal" ip accounter, and I have yet to find any that would use the existing chains (in this case, defined by shorewall), and store data in an SQL database for infinite data gathering. So far, I think I found one that worked on that reads the output of iptables -vnx -L -t filter calles IAM (IP Accounting Monster), howerver, it''s not exactly right. So, based with that priciple in mind, resetting the counters at intervals of 1 or 2 hours, I''m thinking of writing a perl data collection script that would parse the output of iptables and store data into an sql database with a timestamp and reset the counters for the in and out chains of the firewall (dmz2net loc2net net2loc net2dmz for example) After that, it''s just a question of querying collected data from the sql database using built-in stat functions. I''m assuming that the byte counters are correct, is there something I''m missing? This would be a great add-on to shorewall, no? Any feedback would be appreciated. Thanks Kris