Skip to content

Instantly share code, notes, and snippets.

@andybeak
Created January 28, 2016 09:03
Show Gist options
  • Save andybeak/9455c613034faf87802c to your computer and use it in GitHub Desktop.
Save andybeak/9455c613034faf87802c to your computer and use it in GitHub Desktop.
Fail2Ban badbots filter - edited from Debian apache badbots
# Fail2Ban configuration file
#
# Regexp to catch known spambots and software alike. Please verify
# that it is your intent to block IPs which were driven by
# above mentioned bots.
[Definition]
badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider|Baiduspider
badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|D$
failregex = <HOST> - - \[.*\] "(GET|POST).*HTTP.*".*(?:%(badbots)s|%(badbotscustom)s).*"$
ignoreregex =
# DEV Notes:
# List of bad bots fetched from http://www.user-agents.org
# Generated on Thu Nov 7 14:23:35 PST 2013 by files/gen_badbots.
#
# Author: Yaroslav Halchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment