For the past years I've been fed up with these bots hammering almost all of the websites on a single IP at the same time, looking for the regular database dumps, .env files, weaknesses etc etc. These most of the time result in a 10 to 20 minute spike of load for absolutely no good reason at all. Since the prices for all services are rapidly rising due to the RAM shortages, I wanted to be as energy efficient as possible. Every time I got the 'high CPU use' alert from my machines, I logged in, looked at htop for the reason of the peak usage, determined all sites were active, tailed a log to see the IP of the culprit and banned it. CPU load down, back to my restful self.
Since I've been using Claude Code for a few PHP projects, I assumed I could ask it to find a solution for this too. We iterated over a few possible implementations and the result is BotBlocker. I've pushed it to a GitHub for the world to try.
Have a look, try it if you like (no warranties), give feedback, provide suggestions..
It's running on a few of my servers now and I'm anxiously awaiting those spikes.
This is probably far from perfect in this iteration, but I got to start somewhere.
https://github.com/cloudz/botblocker
Since I've been using Claude Code for a few PHP projects, I assumed I could ask it to find a solution for this too. We iterated over a few possible implementations and the result is BotBlocker. I've pushed it to a GitHub for the world to try.
Have a look, try it if you like (no warranties), give feedback, provide suggestions..
It's running on a few of my servers now and I'm anxiously awaiting those spikes.
This is probably far from perfect in this iteration, but I got to start somewhere.
https://github.com/cloudz/botblocker