[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-09-28 12:26:01
This commit is contained in:
parent
e6f26e92a1
commit
bc5193934d
|
|
@ -0,0 +1,13 @@
|
||||||
|
# /etc/fail2ban/filter.d/nginx-generic-badbots.conf
|
||||||
|
#
|
||||||
|
# Filtro genérico para Bad Bots e scanners comuns que se aplica a todos os sites.
|
||||||
|
# Este filtro é referenciado pelas jails individuais de cada site.
|
||||||
|
# *******************************************************************
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
# Detecta tentativas de acesso a arquivos e diretórios sensíveis (path traversal, env, etc.)
|
||||||
|
failregex = ^<HOST> .* "(GET|POST|HEAD|OPTIONS) .*(\.env|\.git/|\.svn/|setup\.php|phpmyadmin/|vendor/|wp-config\.php|wlwmanifest\.xml|test\.php).* HTTP\/1\..*"$
|
||||||
|
# Detecta ferramentas de scanner conhecidas (sqlmap, Nikto, wpscan, etc.)
|
||||||
|
^<HOST> .* "(GET|POST|HEAD|OPTIONS) .*(sqlmap|Nikto|wpscan|Telescope|zgrab|masscan).* HTTP\/1\..*"$
|
||||||
|
|
||||||
|
ignoreregex =
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
# /etc/fail2ban/jail.d/nginx-template.conf
|
||||||
|
#
|
||||||
|
# TEMPLATE: COPIE e RENOMEIE este arquivo para [SEU-SITE].conf
|
||||||
|
# *******************************************************************
|
||||||
|
# Renomeie: nginx-template.conf -> site-meuprojeto.conf
|
||||||
|
# *******************************************************************
|
||||||
|
|
||||||
|
#[nginx-site-meuprojeto-badbots]
|
||||||
|
#enabled = true
|
||||||
|
## Ação: Usa a ação padrão definida no [DEFAULT] do jail.local
|
||||||
|
#action = %(action_mwl)s
|
||||||
|
## Porta a ser banida (HTTPS e HTTP)
|
||||||
|
#port = http,https
|
||||||
|
## Referencia o filtro genérico criado (1.1. Passo)
|
||||||
|
#filter = nginx-generic-badbots
|
||||||
|
## *** CRÍTICO: Mude este caminho para o log dedicado do NGINX ***
|
||||||
|
#logpath = /var/log/nginx/site-meuprojeto.bad-bot.log
|
||||||
|
#
|
||||||
|
## Configurações de Banimento Customizadas
|
||||||
|
#maxretry = 3
|
||||||
|
#findtime = 10m
|
||||||
|
#bantime = 12h
|
||||||
|
#
|
||||||
|
# ===================================================================
|
||||||
|
# JAIL ADICIONAL (Exemplo de log de erro)
|
||||||
|
# ===================================================================
|
||||||
|
#
|
||||||
|
#[nginx-site-meuprojeto-errors]
|
||||||
|
#enabled = false # Desabilite ou Habilite conforme a necessidade de monitoramento
|
||||||
|
#filter = nginx-bad-request
|
||||||
|
#logpath = /var/log/nginx/site-meuprojeto.error.log
|
||||||
|
#maxretry = 5
|
||||||
|
#bantime = 3h
|
||||||
Loading…
Reference in New Issue