Skip to content

How to Lock Out Brute-Force Attacks (Pro)

A CAPTCHA slows a password-guessing bot down. A lockout stops it. After a few failures in a short time, the IP is refused on every protected form for a while.

Go to Configuration → Lockout & IPs. Make sure Lockout is on, then set:

  • Failed attempts allowed: 5 by default.
  • Within (minutes): 15 by default. Each failure restarts this window.
  • Lockout length (minutes): 60 by default.

The Lockout & IPs tab

An hour stops an attack without punishing a shared office for long. Raise it for a site that sees the same attackers every day.

Lockout message is what a locked-out visitor reads. Default “Too many failed attempts from your network. Please try again later.” Click Save Changes.

In a private window, submit a protected form five times with a wrong answer. On the demo store this was the My Account login. Each failure is logged Failed. The fifth also adds a Locked row, “Too many failures, lockout started”.

The sixth attempt is refused before the CAPTCHA is even looked at:

The My Account login refusing a locked-out visitor

The lock covers every protected form, not just the one that was attacked.

Open Advanced CAPTCHA → Firewall. The IP is under Locked Out Right Now, with the form and reason that started it.

Locked Out Right Now, listing four IPs

From here you can lift it early or block the IP for good. See How to Let a Locked-Out Customer Back In.

  • A wrong or missing CAPTCHA answer.
  • The honeypot, or a form submitted too fast.
  • A reCAPTCHA v3 score below the minimum.

Refusals by the block list, country rules, the email guard or the order limit do not count, because those visitors are already turned away. A passed check clears the count.

  • Behind a proxy, set the visitor IP first. Otherwise every visitor arrives from the proxy’s IP and one lockout shuts out everyone. See How to Set the Visitor IP Behind a Proxy.
  • Trusted roles and trusted IPs are never locked out.
  • Get told when it happens with lockout alerts.