tosh has asked for the wisdom of the Perl Monks concerning the following question:
Okay...
I'm using AuthDBI as authentication handler, but now I would like to modify AuthDBI so it can block brute force password attacks.
A simple approach would be to take the IP address of the incoming connection insert it into a database then do a: "select count(id) from access_log where IP = $ENV{REMOTE_ADDR} AND timestamped (last 10 minutes)" and block the access according to whatever rules...
The problem seems to be getting $ENV{REMOTE_ADDR}. I've read some old posts by Doug MacEachern where he states that mod_env isn't available during the authentication stage.
Has this situation changed recently? Is there a way to get the IP address from the $r handler, or is there another way to secure against brute force password attacks while still using DBI to authenticate?
Thanks!!!
Tosh
Comment on Apache::AuthDBI, environment variables and brute force