Forum Moderators: phranque

Message Too Old, No Replies

Error counting

Can Apache count 404 errors - block after X

         

smallcompany

8:25 pm on Feb 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, I just had over 7,000 404s from a single IP address. It took it about 3.5 hours to do that, with no pause. It was switching UAs.

Now I wonder if I could use .htaccess to count 404 errors and make a condition that will say:

block IP which makes more than 20 in a row (or in some time frame).

If this is not possible with Apache itself, would PHP be next step?

In the case of my sites, they're all on Apache servers, and PHP is the only coding language I use for things like email 404s, track queries, etc.

Thanks

Caterham

9:24 pm on Feb 12, 2009 (gmt 0)

10+ Year Member



Can Apache count 404 errors - block after X

No, see mod_security [modsecurity.org].

smallcompany

1:43 am on Feb 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wow!

How complicated is this, or not? Burden on the server?

Thanks