Limit retries for secured directory with .htaccess file
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thank you bathory for your quick response, i had tried fail2ban but it's not working. It doesn't block any thing.
What did you try and it's not working?
There is the "apache-auth" jail that does exactly what you want. See the example in my previous post if you need help to configure fail2ban and apache-auth in ubuntu
i assumed that attempt failure logs are not generating at error.logs file as i'm unable to view any entry there further modsecurity is enabled at my server.
modsecurity_audit.log have details of authentication attempts.
i assumed that attempt failure logs are not generating at error.logs file as i'm unable to view any entry there further modsecurity is enabled at my server.
modsecurity_audit.log have details of authentication attempts.
Failed attempts should be logged like in my post #6
Now if mod_security is logging those attempts in a different logfile, then adapt apache-auth regexes accordingly
But since you have mod_security enabled, why don't you use it to ban brute-force attacks?
ok, can you guide me where to add that script which you have posted earlier.
What script? You mean the mod_security example?
I think it's self explanatory. In the example the poster uses mod_security to protect /sessions
And of course the code goes into the apache config file (apache2.conf for ubuntu), or if it's for a vhost, into the vhost config (/etc/apache2/sites-available/vhost-config)
What script? You mean the mod_security example?
I think it's self explanatory. In the example the poster uses mod_security to protect /sessions
And of course the code goes into the apache config file (apache2.conf for ubuntu), or if it's for a vhost, into the vhost config (/etc/apache2/sites-available/vhost-config)
I have followed the modsecurity example mentioned by you earlier, i have entered codes in vhost file as well but no success yet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.