Login protection — stop password guessing and credential stuffing
This feature runs by default for every domain; the Login Protection tab lets you view and change it.
Login protection counts failed logins on the domain's authentication paths, per client IP and per username, and blocks when a threshold is exceeded:
- One "failure" = a request to an authentication path for which the origin returns 401 or 403.
- Authentication paths = common built-in login URLs (containing
/login,/signin,/auth,/token,/oauth,/session,/authenticate,/register,/signup…) plus any extra paths you add. - The username is read from a form/JSON field (
usernameby default).
On by default for every domain. Until you customize it, a domain uses the built-in defaults: 5 failures per IP in 5 minutes, 20 per username in 1 hour, action Block. Deleting the custom configuration returns to the built-in defaults — protection stays on.
No JS Challenge. Login protection always blocks outright (or only logs); it never returns a JavaScript challenge page. JS challenges are only available in Firewall Rules, Rate Limiting, DDoS and Bot Management — see JS Challenge.
Use it when a botnet is mass-guessing passwords on your login form, or a single account is being tried from many IPs. Example: your /account/signin is not in the built-in list — add it to "Extra authentication paths" to protect it.
Before you start
- The domain has been added and points to VNIS.
- The origin returns 401 or 403 for a failed login (if the origin returns 200 with an error message in the body, the edge does not recognize it as a failure).
- To count per username: the login request sends the username in a form body (
application/x-www-form-urlencoded) or JSON body.
How to configure
- Go to Domains → select a domain → Login Protection tab, in the Security · Traffic defense & scoring group. The Built-in default badge means the domain is using the built-in defaults; Custom means it has been customized.

- Adjust Failures per IP, Per-IP window (seconds, max 7200), Failures per username and Per-username window (seconds, max 7200).
- Choose the Action on violation: Block (default) or Log only.
- (Optional) Change the Username form field (for example
email), add Extra authentication paths (one per line), and turn on Count per hostname (wildcard domains). - Click Save and wait a few seconds for it to sync to the edge. To return to the built-in defaults, delete the custom configuration with the section's delete button (protection stays on).
Configuration fields
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| Enabled | Turns login protection on or off for the domain | On/off | On | Off → the warning "credential-stuffing attempts are not limited" is shown |
| Failures per IP | Number of failures per IP within the window before blocking | 1–1000 | 5 | Exceeded → 429 Too Many Requests + Retry-After |
| Per-IP window (seconds, max 7200) | Counting window per IP | 10–7200 seconds | 300 (5 minutes) | Maximum 7200 (2 hours) |
| Failures per username | Number of failures per username (from any IP) before locking | 1–10000 | 20 | Exceeded → 423 Locked for that username |
| Per-username window (seconds, max 7200) | Counting window per username | 60–7200 seconds | 3600 (1 hour) | Maximum 7200 |
| Action on violation | Action when a threshold is exceeded | Block / Log only | Block | See the table below |
| Username form field | Name of the form/JSON field containing the username | 1–64 characters: letters, digits, _ . - | username | For example email, login |
| Extra authentication paths (one per line) | Authentication paths added to the built-in list | Up to 50 lines; each line starts with /, ≥3 characters (up to 256), no spaces, cannot be just / | — | Saved in lowercase automatically; matching is case-insensitive |
| Count per hostname (wildcard domains) | For wildcard domains, count separately for each actual hostname | On/off | Off | — |
Action on violation:
| Action | Per IP | Per username | Notes |
|---|---|---|---|
| Block | 429 + Retry-After (time remaining in the window) | 423 Locked | 429 is used instead of 403 to be safe with CGNAT (many people sharing an IP are only delayed and can try again). No JS challenge |
| Log only | Only logs the violation; the request still goes through | Only logs | Use it to measure before switching to Block |
Configuration examples
Example 1 — Keep the defaults (recommended for most domains).
- Nothing to do: 5 failures per IP per 5 minutes → 429; 20 failures per username per hour → 423.
Example 2 — Non-standard login pages and login by email.
- Extra authentication paths:
/account/signin,/api/v1/auth/token· Username form field:email. - Result: failures on these two paths are also counted; accounts are locked by email.
- Check: send 6 failed logins in a row from the same IP to
/account/signin→ the next one receives429withRetry-After.
Example 3 — Measure before tightening thresholds.
- Set the action to Log only and lower Failures per IP to
3for a few days, then review the violation logs; if there are few false positives, switch back to Block.
Example 4 — A busy office where many users share one IP.
- Raise Failures per IP (for example
30) but keep Failures per username — an account under attack is still locked, while the whole office does not get 429 because a few people mistyped.
Order of evaluation
- Login protection counts based on the origin's response (401/403) on authentication paths — it does not depend on the WAF or rate limiting.
- Firewall
allow/bypassand Access Controlallowskip login protection (see Firewall Rules). - It can be combined with Rate Limiting (which limits the total number of requests to
/login, including successful ones) — the two features are independent.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Saving returns a window error | Window > 7200 or below the minimum (IP 10, username 60) | Set a value within range; maximum 7200 seconds |
| Saving returns a path error | A line does not start with /, is just /, is shorter than 3 characters, contains spaces, or there are more than 50 lines | Fix each line according to the rules in Configuration fields |
| Saving returns a Username form field error | Invalid characters or longer than 64 characters | Use only letters, digits, _ . - |
| Many failed logins are not blocked | The origin returns 200 for a wrong password, or the path is not in the list | Make the origin return 401/403; add the path to Extra authentication paths |
| Real users receive 429 on the login page | Many people sharing an IP (CGNAT/office) mistyped their passwords | Raise Failures per IP; wait for Retry-After |
| An account receives 423 | The username exceeded the failure threshold from many IPs (a sign of an attack) | Wait for the window to end (1 hour by default); consider asking the user to change their password |
FAQ
- I have never configured it — is my domain protected? Yes. The built-in defaults are on for every domain (5 per IP per 5 minutes, 20 per username per hour, Block).
- Why is the per-IP response 429 rather than 403? To be safe for users behind CGNAT: 429 +
Retry-Aftertells the client to wait and try again, rather than permanently blocking everyone who shares the IP. - Is there a JS challenge page for login forms? No. Login protection does not use JS challenges. If you want to challenge browsers before they reach the login page, use a Firewall Rule with the JS Challenge action on the login HTML page (watch the fallback behavior for POST requests — see JS Challenge).
- Does deleting the configuration turn protection off? No. Deleting only returns to the built-in defaults (still on). To turn it off completely, switch Enabled off and click Save.
- How are extra paths matched? Case-insensitively; a request is counted if its path contains the configured string.