7 comments show more
11 months ago

fail2ban is a good tool against many external attacks. The only precondition is that by the attack is generated an error in a log, and you are the admin of the firewall (or host.deny etc). What mistakes Fail2ban triggers a reaction from, you determine with simple rules. It is worthwhile in any case to deal with it as many different web services can be secured with it.

On my system it runs since 2 years. Many predefined configs on wich you uncomment(activate) your personal triggers. Special triggers/reactions are simple to construct.


Example:

"/var/log/messages" logs




Jul 1 02:49:24 lpmoeller sshd[9382]: Address 66.135.61.28 maps to cce-inc.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

Jul 1 02:49:26 lpmoeller sshd[9387]: Address 66.135.61.28 maps to cce-inc.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

Jul 1 02:49:27 lpmoeller sshd[9389]: Address 66.135.61.28 maps to cce-inc.com, but this does not map back to the address - POS
... show more

11 months ago

.htaccess




RewriteEngine On


#Blocking IP

order allow,deny

deny from 82.170.168.91

deny from 58.218.199.

allow from all


#Blocking bad bots and site rippers (aka offline browsers)

RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]

RewriteCond %{HTTP_USER_AGENT} ^Bot mailto:craftbot@yahoo.com [OR]

RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]

RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]

RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]

RewriteCond %{HTTP_USER_AGENT} ^Download Demon [OR]

RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]

RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]

RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]

RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]

RewriteCond %{HTTP_USER_AGENT} ^Express WebPictures [OR]

RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]

RewriteCond %{HTTP_USER_AGENT} ^Ey
... show more