Bruteforce (DDOS) attacks prevention and monitoring

November 9, 2019 129 views


I’m working on a username/password protected system and I have login.php file that accepts username and password pair over https and just responds with with an error code or success code.

Question: how to monitor if someone started a bruteforce attack on my login.php script (assuming they are making a lot of requests to it) and how to block them from doing that?

Thank you!

1 Answer


I would recommend adding a captcha to the login page, that way you would stop most of the bots from brute-forcing the login page.

Also, you could check your Nginx or Apache access logs in order to identify if there are any suspicious numbers of requests to the login page. You could have a look at this script which would summarize the access logs for you.

Hope that this helps!

Have another answer? Share your knowledge.