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.

Here's my thought,

Set a threshold like 30 times in a minute, then block this IP for a few minutes.

But If the attacker forge the source IP address, this could block legitimate user immediately.

And I'm confused now.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

a common way to block brute forces on all types of services, including http basic auth is fail2ban. Bots can't forge a source IP address for a full TCP connection(in your case a HTTP request), you don't have to worry about that. (see Are IP addresses "trivial to forge"? )

share|improve this answer

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.