LRB-cache (Least Resently Blocked Cache blocking cache) is a mechanism that allows you to significantly save iBatyr WAF server resources when there are a large number of illegitimate requests with common source characteristics at the time of a bot attack or DDoS activity. This mechanism is an integral part of iBatyr WAF and is configured by default during deployment.
After several blocking of illegitimate requests (the number of blocking is set by LRB_CACHE_BAN_AFTER) from one source with common parameters specified by IP, method, path, user-agent header value, this set of parameters is added to LRB-cache. All subsequent requests from this source are blocked automatically without analysis at the ibatyr-nginx level for several seconds (the number of seconds is set by the LRB_CACHE parameter).
As a result, this makes it possible to cope with exhaustion attacks, vulnerability scans, fuzzing of parameters of any form or function of the protected application, and, among other things, withstand attacks that can load multiple times the iBatyr WAF throughput in relation to legitimate traffic.
LRB-cache settings are configured in /etc/ibatyr-nginx/user/server.conf.
The default settings are shown below:
set $LRB_CACHE_BAN_AFTER 5;
set $LRB_CACHE 300;
Note
If necessary, you can disable LRB-cache by setting $LRB_CACHE 0;.