22
0
Fork 0

Ajout pm2-auth-failure

This commit is contained in:
Benoît S. 2020-08-14 10:20:21 +02:00
parent c9817402a4
commit 62eb9338bb
1 changed files with 27 additions and 0 deletions

View File

@ -661,6 +661,33 @@ maxretry = 10
findtime = 300
~~~
### pm2 / nodejs
/etc/fail2ban/filter.d/pm2-auth-failure.conf :
~~~
[Definition]
failregex = .*Auth failure, WRONG_HASH for IP <HOST> .*
[Init]
datepattern = ^%%Y-%%m-%%d %%H:%%M
~~~
Définition de la jail :
~~~
[pm2-auth-failure]
enabled = true
port = http,https
filter = pm2-auth-failure
logpath = /home/APPPATH/.pm2/logs/api-error.log tail
maxretry = 30
findtime = 3600
# A supprimmer une fois periode de test terminé
banaction = none
action = %(action_mailwhoisonly)s
~~~
## Munin
Pour activer les plugins Munin pour Fail2Ban :