I'm just curious if there are best practices for how long to ban a misbehaving IP. Here are a few scenarios - let me know your thoughts on each…
- A bot that's not abiding by your robots.txt
- A bot that's posting spam
- A bot that's actively trying to do fairly serious harm (SQL injection, etc.)
- A person (validated by reCAPTCHA) who is posting spam
- A person you've banned from a social-type site who may may be upset enough by the ban that they'd try to harm the site
Would you ban for a longer time if the IP has a history of problems? If so, how far do you look back, or how what type of historic patterns would make you give a longer ban?
Would you ban for a longer period of time if the IP is listed in AbuseIPDB?
Do you give longer bans if the IP is from a country that tends to have more problem traffic than good traffic?
And related to all that - what are your thresholds for banning an entire subnet?
Thanks in advance for your feedback!