Brute Force Protection
Directives
Section titled “Directives”| Directive | Syntax | Default |
|---|---|---|
BruteForceProtection | On|Off | Off |
BruteForceAllowedAttempts | N | 10 |
BruteForceWindow | seconds | 300 |
BruteForceAction | block|throttle|log | block |
BruteForceThrottleDuration | milliseconds | 5000 |
BruteForceXForwardedFor | On|Off | Off |
BruteForceTrustedProxy | IP/CIDR [IP/CIDR ...] | (none) |
BruteForceWhitelist | IP/CIDR [IP/CIDR ...] | (none) |
BruteForceProtectPath | /path | (none) |
Example
Section titled “Example”Protect WordPress Login
Section titled “Protect WordPress Login”LSBruteForceProtection OnLSBruteForceAllowedAttempts 5LSBruteForceWindow 600LSBruteForceAction throttleLSBruteForceThrottleDuration 10000LSBruteForceXForwardedFor OnLSBruteForceTrustedProxy 10.0.0.0/8LSBruteForceWhitelist 192.168.1.0/24 10.0.0.0/8LSBruteForceProtectPath /wp-login.phpThis throttles login attempts to 5 per 10 minutes, with a 10-second delay between throttled requests. Requests from the whitelisted subnets are exempt. Because BruteForceTrustedProxy is set, X-Forwarded-For is trusted only when the request arrives via 10.0.0.0/8.
Kernel-Level Escalation (optional)
Section titled “Kernel-Level Escalation (optional)”When the firewall daemon is running, a threshold crossing also escalates to an nftables kernel drop — the attacker’s packets are discarded before reaching OpenLiteSpeed at all. The notification fires exactly once per attacker per window; the block carries the window as its TTL and expires automatically. Without the daemon, the 403 above is the complete behaviour.