

Fail2Ban and following steps to block suspicious access/requests:
sudo nano /etc/fail2ban/filter.d/nginx-custom-rules.conf
[Definition]
failregex = ^<HOST> - - \\[.*\\] "POST /cgi-bin/.*(\\.%%2e|%%%%32%%65).* HTTP/1\\.1" 400
^<HOST> - - \\[.*\\] "GET /\\.env HTTP/1\\.1" 400
^<HOST> - - \\[.*\\] "GET /manager/text/list HTTP/1\\.1" 400
^<HOST> - - \\[.*\\] "GET / HTTP/1\\.1" 400
^<HOST> - - \\[.*\\] "GET /favicon\\.ico HTTP/1\\.1" 400
^<HOST> - - \\[.*\\] ".*(zgrab|Keydrop).*"
^<HOST> - - \\[.*\\] ".*[^\\x20-\\x7E].*" # Detects non-ASCII or malformed requests
ignoreregex =

sudo fail2ban-client -d
