in reply to Re^2: A module to deny ip on multiple sketchy http requests, yes, no?
in thread A module to deny ip on multiple sketchy http requests, yes, no?

In my case the 10 sec delay acceptable. This limits a dictionary attack to 6 times a minute instead of how ever may times the webserver can respond in the same minute. Actually, I guess the webserver will still be responding as fast as it can, only 1 crack attempt will be allowed through every 10 seconds, the rest will be thrown away. If the script can be served 100 times a second, then only 1 in 1000 crack attempts will actually be tried. The cracker will work his way through the entire dictionary with only a tiny percent actually making it through. (granted, it only takes one success to mess you up)

But that's just my code, which is still a work in progress. You could easily keep count the number of attempts made during the 10 second timeout and permanently add the address to another table or extend the timeout indefinitely if a threshold is reached (like say more than 2 attempts). The 10 second rule doesn't have to be temporary, it's just an arbitrary timeout.

Others rely on Apache to provide the security and I guess that's ok for them. Myself, I've never been keen on leaving it to the webserver. If your cgi application needs security, build it into the cgi. You never know (or may not have control over) when the server configuration changes or file permissions may change, and then all your .htaccess rules go out the window. But like I say, that's just me.
  • Comment on Re^3: A module to deny ip on multiple sketchy http requests, yes, no?