1 Ban IP addresses on shared hosting where Fail2ban is not available
Viktor Szépe edited this page 2017-07-11 14:46:21 +02:00

I am missing fail2ban so much on cheap shared hosting that I've rewritten it in PHP.

Actions

There are several kinds of banning (I call them methods, not actions)

  • Apache RewriteMap + RewriteRule [F]
  • Apache SetEnvIf + Deny
  • CloudFlare API
  • Respond with HTTP 403 (and no further banning)
  • Nginx user config (TODO)
  • Tarpit (and no further banning)
  • WordPress plugin based

See https://github.com/szepeviktor/wordpress-fail2ban/tree/master/miniban

Features

  • whitelist
  • ban time
  • unban
  • etc.