#StackBounty: #fail2ban Block badbot with fail2ban via user agents in access.log

Bounty: 50

How can I create a filter to block these with fail2ban?

    476 Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)
    892 ltx71 - (http://ltx71.com/)
    5367 Mozilla/5.0 (compatible; DotBot/1.1; http://www.opensiteexplorer.org/dotbot, help@moz.com)
   6449 Barkrowler/0.9 (+http://www.exensa.com/crawl)

This list come out from this:

sudo cat /var/log/apache2/access.log | awk -F" '{print $6}' | sort | uniq -c | sort -n

I’ve tried apache-badbot.conf, but it does not seem to work …


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.