Bonjour,
j'essaye, en vain, de banir la ligne suivante en utilisant
le failregex d'origine de apache-noscript :
root@XXXX:/etc/fail2ban#fail2ban-regex '[Mon Jun 22 09:55:16.780767 2015] [:error] [pid 1962] [client 1.2.3.4:38909] script '/var/html/abc.php' not found or unable to stat' filter.d/apache-noscript.conf
failregex = ^%(_apache_error_client)s ((AH001(28|30): )?File does not exist|(AH01264: )?script not found or unable to stat): /\S*(.php|.a$
^%(_apache_error_client)s script '/\S*(.php|.asp|.exe|.pl)\S*' not found or unable to stat\s*$
le résultat est :
Lines: 1 lines, 0 ignored, 0 matched, 1 missed
|- Missed line(s):
| [Mon Jun 22 09:55:16.780767 2015] [:error] [pid 1962] [client 1.2.3.4:38909] script /var/html/abc.php not found or unable to stat
la ligne est 'missed' alors que normalement (à mon avis) elle devrait apparaître comme étant 'matched'.
quelle failregex doit on utiliser pour que cette ligne apparaisse comme 'matched' ?
par avance, merci pour vore aide.
j'essaye, en vain, de banir la ligne suivante en utilisant
le failregex d'origine de apache-noscript :
root@XXXX:/etc/fail2ban#fail2ban-regex '[Mon Jun 22 09:55:16.780767 2015] [:error] [pid 1962] [client 1.2.3.4:38909] script '/var/html/abc.php' not found or unable to stat' filter.d/apache-noscript.conf
failregex = ^%(_apache_error_client)s ((AH001(28|30): )?File does not exist|(AH01264: )?script not found or unable to stat): /\S*(.php|.a$
^%(_apache_error_client)s script '/\S*(.php|.asp|.exe|.pl)\S*' not found or unable to stat\s*$
le résultat est :
Lines: 1 lines, 0 ignored, 0 matched, 1 missed
|- Missed line(s):
| [Mon Jun 22 09:55:16.780767 2015] [:error] [pid 1962] [client 1.2.3.4:38909] script /var/html/abc.php not found or unable to stat
la ligne est 'missed' alors que normalement (à mon avis) elle devrait apparaître comme étant 'matched'.
quelle failregex doit on utiliser pour que cette ligne apparaisse comme 'matched' ?
par avance, merci pour vore aide.