Forum Moderators: phranque

Message Too Old, No Replies

Blocking Scrapers and Bad Bots with Mod Security

         

jake66

2:47 am on Jun 23, 2007 (gmt 0)

10+ Year Member



Not sure if this belongs in the Apache forum or not..

but I am using mod_security with Cpanel on my VPS.

I took a read of the documentation on mod security's website and it doesn't seem very newbie-friendly. Most other tutorial sites warn against customizing the rules for fear of breaking the server..

Here is a bit of my mod_security default rules:

# WEB-ATTACKS wget command attempt
SecFilterSelective THE_REQUEST "wget "

# WEB-ATTACKS uname -a command attempt
SecFilterSelective THE_REQUEST "uname -a"

i would like to lessen my .htaccess rules and compress them all into mod_security.

Here is a bit of my .htaccess block rules:

SetEnvIfNoCase User-Agent "Baiduspider" bad_bot
SetEnvIfNoCase User-Agent "charlotte/" bad_bot
SetEnvIfNoCase User-Agent "fast enterprise crawler 6" bad_bot
<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 127.0.0.1
deny from 212.143.190.214

Is what I want to do, feasible for someone that's never used mod_security before?