Forum Moderators: bakedjake
Can anybody point me in the right direction?
Having a lot of IPs blocked via IPCHAINS will degrade performance eventually so I advise a second script which either drops blocked IPs after some period (12 hours, a week, whatever) or removes the oldest blocked IPs after those currently blocked reach a certain number (100, 500, etc.). Since you'll have a block history log you can create permanent IPCHAINS rules for IPs that are repeatedly blocked. You'll also probably want to have a whitelist of IPs from search engines and other trusted IPs/subnets depending on your thresholds.
Logging can be done in your favorite language (PHP, Perl, C, Python, etc.) and the scripts can be in something as simple as Bourne/Bash.