How to block a lot of ip's?

I would like to block a very large quantity of ip’s.
I have 5 forums on my vps and they are being targeted by a large spambot attack.

The majority of the attack seems to come through the Tor network. So I blocked 2300 ip’s using .htaccess files on every site. This cuts down the attack by 95%.

I prefere to block the IP’s through Apache, but I have no idea how to do that.

Is this possible in Interworx?

I have tried using the firewall but it seems that ip’s I have added manually don’t stay in the firewall after a couple of weeks.

Ziggy, what forum software you using?

I have a few vBullentin (3.8) forums and I was getting hammered like you. Funny thing when I added the IPs to the vBulletin Banned IP field it worked great. But instead of making double entire in both forums I decided to use the Firewall. All my IPs are staying in the firewall but they were not blocking the IPs the spammers were using to set up accounts on my forums. In fact I tracked one specific IP address and the attacks didnt stop until I added in the vBulletin Banned IP field, which caused me to think that the Firewall IP blacklist was only for email. Go figure.

I am using SMF 2.0.
They don’t offer a way to enter large quantities of IP’s at once. I didn’t want to enter 2300 one by one, so I used .htaccess.

It would be a lot easier if this could be done through Nodeworx.