Update globalblacklist-testing.template [skip ci]

Ref: #568 

Modify template for Super Rate Limiting Function
This commit is contained in:
Mitchell Krog 2024-04-30 12:53:33 +02:00 committed by GitHub
parent 7755357057
commit e67b18011f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18967,18 +18967,28 @@ geo $ratelimited {
# ============================================ # ============================================
# -------------------------------------------- # --------------------------------------------
# 1. MAP BAD BOTS TO OUR RATE LIMITER FUNCTION # 4.1. MAP BAD BOTS TO OUR RATE LIMITER FUNCTION
# -------------------------------------------- # --------------------------------------------
map $bad_bot $bot_iplimit { map $bad_bot $bot_iplimit {
0 ""; 0 "";
1 ""; 1 "";
2 $binary_remote_addr; 2 $binary_remote_addr;
4 $binary_remote_addr; 4 "";
} }
# --------------------------------------------------
# 4.2. MAP BAD BOTS TO OUR SUPER RATE LIMITER FUNCTION
# --------------------------------------------------
map $bad_bot $bot_iplimit2 {
0 "";
1 "";
2 "";
4 $binary_remote_addr;
}
# -------------------------- # --------------------------
# 2. SET RATE LIMITING ZONES # 4.3. SET RATE LIMITING ZONES
# -------------------------- # --------------------------
# BAD BOT RATE LIMITING ZONE # BAD BOT RATE LIMITING ZONE
@ -18990,8 +19000,9 @@ geo $ratelimited {
# BAD BOT SUPER RATE LIMITING ZONE # BAD BOT SUPER RATE LIMITING ZONE
# Super Rate limiting will only take effect if on any User-Agents with a value of 4 # Super Rate limiting will only take effect if on any User-Agents with a value of 4
limit_conn_zone $bot_iplimit zone=bot4_connlimit:16m; limit_conn_zone $bot_iplimit2 zone=bot4_connlimit:16m;
limit_req_zone $bot_iplimit zone=bot4_reqlimitip:16m rate=1r/m; limit_req_zone $bot_iplimit2 zone=bot4_reqlimitip:16m rate=1r/m;
# ========================================== # ==========================================
# END SECTION 4 - ACTIVATE BLOCKER FUNCTIONS # END SECTION 4 - ACTIVATE BLOCKER FUNCTIONS