Brute-force protection
OkYouIn is on the sign-in path of your VPNs and applications, so it is also where guessing attacks arrive. Several independent layers deal with them, each keyed differently so that one attacker technique cannot slip past all of them:
| Layer | Counts per | Stops | Where to configure |
|---|---|---|---|
| Blocked IPs | client address | one address guessing across many accounts | Logging ▸ Blocked IPs |
| Account lockout | account | guessing one account’s password | Settings ▸ System ▸ Authentication & Sessions |
| CAPTCHA and honeypot | client address | scripted guessing on the console login | Settings ▸ System ▸ Authentication & Sessions |
| Push flood protection | user | push bombing (“MFA fatigue”) | Settings ▸ System ▸ MFA Settings |
| MFA limits for RADIUS | user, and application + address | code guessing and push spam through RADIUS devices | Access ▸ Settings ▸ RADIUS |
On top of these, OkYouIn never tells a client why a sign-in failed: an unknown user, a wrong password, a locked account and a policy denial all get the same answer, so the responses cannot be used to find valid account names.
Blocked IPs
Section titled “Blocked IPs”Failed sign-ins are counted per client address in the database, so every server process — and the RADIUS path — counts together. An address that fails too often is blocked for a while, and longer each time it comes back.
Open Logging ▸ Blocked IPs. The page lists active and expired blocks (address, source, reason, failures, strike, Blocked until, last username tried) and holds the Brute-force protection settings.
What counts as a failure
Section titled “What counts as a failure”| Source | Failures |
|---|---|
| Console | wrong password, unknown, inactive or locked account, console access denied, the honeypot field filled in |
| MFA | a wrong, already used or invalid code or token; an unknown e-mail link |
| Device | invalid pairing or status tokens, codes or passkeys sent to the web app’s device endpoints |
| RADIUS | wrong password, unknown user, wrong domain, locked user, wrong or replayed MFA code, failed MFA |
| SSO, API | failed sign-ins on the single sign-on page and through the Verify API (the end user’s address) |
A directory that does not answer is not counted — that says nothing about the password.
RADIUS counts the end user, never the device. For RADIUS, the address counted is the end user’s, from Calling-Station-Id. The RADIUS client (the NAS) itself is never counted or blocked. A request whose Calling-Station-Id is missing or not an IP address is not counted here at all; account lockout and the MFA limits still apply to it.
IPv6 addresses are counted per /64, since one host can use a whole /64.
A success clears nothing. Failures simply age out of the window. Otherwise an attacker could reset the count by signing in to an account of its own between guesses.
Blocking and escalation
Section titled “Blocking and escalation”| Setting | Default | Range |
|---|---|---|
| Block automatically | on | — |
| Failures before a block | 10 | 3–1000 |
| Counting window (minutes) | 15 | 1–1440 |
| Block time (minutes) | 15 | 1–1440 |
| Escalate repeat offences | on | — |
With the defaults, 10 failures from one address within 15 minutes block it for 15 minutes. With Escalate repeat offences on, an address blocked again within 24 hours after its previous block ended is blocked four times longer each time, up to 24 hours:
| Strike | 1 | 2 | 3 | 4 | 5 and later |
|---|---|---|---|---|---|
| Block | 15 min | 60 min | 4 h | 16 h | 24 h |
A blocked address is refused before any work is done — before the user is looked up, before a password is hashed or a directory is asked. Web requests get the same “Too many requests” answer as an ordinary rate limit; RADIUS gets an Access-Reject with “Too many sign-in attempts, try again in N minutes”. Because a blocked address never reaches the password check, it cannot keep a victim’s account locked out either.
Each automatic block is written to the audit log and opens a warning alert for that address (one alert per address, so a repeat offender does not flood your notification channels). Unblocking resolves it.
Allowlist
Section titled “Allowlist”Never blocked (allowlist) takes network objects. Addresses inside them are never counted and never blocked, and an existing block of theirs is not enforced. Put here your offices, monitoring systems and your own administration network.
Manual blocks and unblocking
Section titled “Manual blocks and unblocking”Block IP blocks one address (an IPv6 address blocks its /64) for 1 minute up to 365 days, with an optional comment. You cannot block an allowlisted address or the address you are connected from. Manual blocks apply even when Block automatically is off.
Unblock ends a block at once and forgets the address’s failures and repeat-offence history. Forget does the same for an expired block.
Viewing the page needs View on the Blocked IPs RBAC section, blocking and unblocking needs Manage. Changing the protection settings needs the Settings edit permission, so an operator can unblock a user’s address without being able to weaken the protection.
Account lockout
Section titled “Account lockout”After Max login attempts consecutive wrong passwords (default 5), the account is locked for Lockout duration (minutes) (default 15). This applies to every password check OkYouIn makes — the console, the single sign-on page and RADIUS — for local accounts and for directory accounts whose password OkYouIn verifies. A correct password resets the count.
A locked account is refused everywhere until the lock expires or an administrator clicks Unlock on the user. The user can be e-mailed when they are locked and unlocked (Settings ▸ Integrations ▸ Email, notifications Account locked / Account unlocked). Wrong MFA codes never lock the account; they are limited separately (below).
CAPTCHA and honeypot
Section titled “CAPTCHA and honeypot”The console login form has two extra defences, both on by default:
- Enable adaptive CAPTCHA — a self-hosted ALTCHA proof-of-work, shown only after Challenge threshold failed logins from one address within 15 minutes (default 3; 0 = always). Correct credentials below the threshold — including API scripts — are never challenged. Challenge complexity (default 50 000) sets how much CPU each challenge costs the browser.
- Enable honeypot field — a hidden decoy field that real users and API clients never fill in; a submission that fills it is refused like a wrong password.
Per-address rate limits on login, token refresh, password change and CAPTCHA requests are set by RATE_LIMIT_* environment variables on the server, not in the console.
Push flood protection
Section titled “Push flood protection”Whoever holds a user’s password can start sign-in after sign-in, each one sending the user a push, until a tired tap on Approve lets them in. Push flood protection limits the sign-in pushes one user receives — Telegram, OkYouIn web app push and e-mail Approve links, from every application together.
Configure it under Settings ▸ System ▸ MFA Settings, card Global MFA Settings, section Push flood protection:
| Setting | Default | Meaning |
|---|---|---|
| Pushes per user / Within | 5 / 10 minutes | At most 5 pushes to one user in 10 minutes. 0 = off. |
| Pause after failed pushes | 3 in a row | Pushes in a row that were denied, reported as “This wasn’t me” or left unanswered pause pushes to that user. An approval starts the count again. 0 = off. |
| Failed within | 10 minutes | Those failed pushes must fall within this time. |
| Pause length | 15 minutes | How long pushes stay paused after the last failed one. |
When a push is refused, it is not sent and the user’s legitimate pending push stays. The sign-in fails with “Too many sign-in requests were sent to you — try again in N min.”, the event is audited and a warning alert for that user fires. Where a code can still be used, the user is not stuck:
- an e-mail still goes out with its code, just without the Approve / Deny links;
- OkYouIn web app push on the console asks for the app’s offline code instead.
TOTP codes are never limited here — they are not pushes.
MFA limits per user (RADIUS)
Section titled “MFA limits per user (RADIUS)”RADIUS sign-ins have their own limits under Access ▸ Settings ▸ RADIUS, card MFA limits per user. They are shared with the Windows logon agent and the single sign-on page:
| Setting | Default | Meaning |
|---|---|---|
| Challenges per window / Challenge window (seconds) | 30 / 600 | New MFA challenges (code prompts, e-mailed codes, pushes) one user may get; then sign-ins are refused with “Too many sign-in attempts, try again in N minutes”. Every SSH login and every sudo through pam_radius is one challenge. |
| Wrong codes per window / Wrong-code window (seconds) | 10 / 900 | Wrong MFA codes of one user, any application; then further codes are refused. |
| Failed pushes before a pause / Pause (seconds) | 5 / 30 | Denied or unanswered pushes from one client address to one application start a short pause for that address and application. Other applications and addresses are not affected. |
The console login has its own budget per login attempt: five wrong codes, and at most five pushes sent 20 seconds apart, before the user has to start over with the password.
Where to see it
Section titled “Where to see it”- Logging ▸ Blocked IPs — every automatic and manual block.
- Access log — refusals with their reason: IP address blocked (brute-force protection), Too many pushes to the user (push flood), Rate limited, User locked.
- Audit log — blocks, unblocks, lockouts and push-flood refusals.
- Alerts — one per blocked address and one per push-flooded user.