To test your configs, check your apache-badbots.conf and find the failregex.

Code:

failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$

 

Chose one entry from “badbots” and run fail2ban-regex with a test-string against your apache-badbots.conf:

Code:

fail2ban-regex '1.2.3.4 - - [12/Feb/2013:10:53:59 +0100] "GET / HTTP/1.1 200" 39460 "-" "autoemailspider"' /etc/fail2ban/filter.d/apache-badbots.conf

 

You should get something like “Success, the total number of match is 1”