Hi Amy,
Okay, so if I block the IP addresses, it's possible the hacker will have an onion router so I can't see their IP address.
I don't fully understand onion routers, but if I understand correctly -- users within a group share, or mix and match IP addresses in order to make back-tracing to one specifiic user impossible. This might be used for hacking attempts, and add more IPs to the mix of ones detected...but don't quote me on that.
If I use something to shut down the user themselves and not let them get into their account after so many wrong attempts, I may have a lot of users try to get in touch with me with complaints.
I've forgotten my password before and been
max-attempted out of trying to login to a site. The user will know they are pushing the envelope. You can also include a way for a user to reset their password to their database-stored email address (only). You shouldn't get too many complaints when the users realize their personal info is safe with you. Also, my little script resets after the time-limit -- on every attempt, not as a batch.
I'm understanding that there are even problems with the sleep function.
If we use all these functions at once, are we really any safer? Can we win?
I'm not sure I would use
sleep, it freezes the whole script execution and probably will frustrate users. My little example takes number of attempts within a specific time-frame into consideration without using sleep.
As was mentioned, there is no
absolute security methodology. There is only your best effort against the hackers. Also, how sensitive is your data that you're protecting -- how tempting is it to advanced hackers? If it is really valuable, I would recommend getting a security specialist on-board, otherwise do your best and get a good nights sleep.
Cheers