Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We set up a Subversion server via the Apache module mod_dav_svn and the authentification is done via LDAP.
Now we would like to limit the login attempts to Subversion to prevent brute force attacks. If a user (or a bot) enters its password three times wrong, he should be blocked for a specific time.

How can we establish this protection with the setup described above?

share|improve this question

migrated from stackoverflow.com Nov 25 '11 at 11:38

This question came from our site for professional and enthusiast programmers.

    
This belongs in Server Fault land I think - voting to migrate. But interesting question –  Pekka 웃 Nov 25 '11 at 10:51
    
@Pekka: Thanks for the migration! –  guerda Nov 25 '11 at 12:26
add comment

2 Answers

mod_dav_svn has an extensive logging feature. Combine this with Fail2ban and you should be able to intercept brute-force login attempts.

share|improve this answer
add comment

You can do that in LDAP itself, if it supports the password policy IETF draft. (OpenLDAP does.) Just set the standard policy's pwdLockout attribute to true, pwdMaxFailure to a non-zero value, say 3 in your case, and pwdLockoutDuration to however many seconds you want the lockout to be, say 300, whatever you think is long enough to deter bots without annoying the hell out of real users.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.