Ajout option --print-all-matched pour tester une règle
This commit is contained in:
parent
895545f5e2
commit
40ace85215
|
@ -220,7 +220,15 @@ failregex = warning: \[<HOST>\]: authentication failed:
|
|||
ignoreregex =
|
||||
~~~
|
||||
|
||||
On peut tester sa règle avec la commande **fail2ban-regex** en précisant une date :
|
||||
Pour tester une règle :
|
||||
|
||||
~~~
|
||||
$ fail2ban-regex auth.log /etc/fail2ban/filter.d/evolix-test.conf
|
||||
~~~
|
||||
|
||||
Afin d'obtenir des informations supplémentaires - dans le cas où on cherche les heures de connexion d'une adresse IP particulière - on peut utiliser les options `-v` et/ou `--print-all-matched`.
|
||||
|
||||
On peut aussi tester avec une date :
|
||||
|
||||
~~~
|
||||
$ fail2ban-regex '2017-05-20 10:10:10 foo' 'warning: \[<HOST>\]: authentication failed:'
|
||||
|
@ -234,16 +242,8 @@ Failregex: 1 total
|
|||
|- #) [# of hits] regular expression
|
||||
| 1) [1] \[<HOST>\]: authentication failed:
|
||||
[...]
|
||||
|
||||
$ fail2ban-regex auth.log /etc/fail2ban/filter.d/evolix-test.conf
|
||||
[...]
|
||||
~~~
|
||||
|
||||
Afin d'obtenir des informations supplémentaires - dans le cas où on cherche les heures de connexion d'une adresse IP particulière - on peut utiliser l'option `-v`
|
||||
|
||||
~~~
|
||||
$ fail2ban-regex -v auth.log /etc/fail2ban/filter.d/evolix-test.conf
|
||||
~~~
|
||||
|
||||
### Actions
|
||||
|
||||
|
|
Loading…
Reference in a new issue