Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: A module to deny ip on multiple sketchy http requests, yes, no?

by TedPride (Priest)
on May 25, 2006 at 21:04 UTC ( [id://551704]=note: print w/replies, xml ) Need Help??


in reply to A module to deny ip on multiple sketchy http requests, yes, no?

Make a table with (a) IP or IP range (might want to have a 2 or 3-character hash index to speed up lookup) (b) most recent access time (c) number of requests made within x seconds of most recent access time. If the number of (c) goes over a certain limit, ban them using .htaccess. Also run a cron job every few hours that reduces the (c) count by 1 every hour or something, so legit users who access too fast every now and then won't get auto-banned.

If the user is logged in, you can of course do this with their user name instead of IP.

  • Comment on Re: A module to deny ip on multiple sketchy http requests, yes, no?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://551704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-19 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found