Update globalblacklist.template

Ref #568 

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

View file

@ -19347,18 +19347,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 {
0 "";
1 "";
2 $binary_remote_addr;
4 $binary_remote_addr;
}
map $bad_bot $bot_iplimit {
0 "";
1 "";
2 $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
@ -19370,8 +19380,9 @@ geo $ratelimited {
# BAD BOT SUPER RATE LIMITING ZONE
# 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_req_zone $bot_iplimit zone=bot4_reqlimitip:16m rate=1r/m;
limit_conn_zone $bot_iplimit2 zone=bot4_connlimit:16m;
limit_req_zone $bot_iplimit2 zone=bot4_reqlimitip:16m rate=1r/m;
# ==========================================
# END SECTION 4 - ACTIVATE BLOCKER FUNCTIONS