Fail2ban : regex qui ne match pas

Hello,

J’ai un problème avec Fail2ban, la regex que je teste ne match rien… j’ai essayé pas mal de solutions, mais rien n’y fait.

Voici la log :

2018-12-10 17:04:02 INFO    x.x.x.x   functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for 'xxxx'
2018-12-10 17:04:53 INFO    x.x.x.x   functions_dolibarr::check_user_password_dolibarr Authentification ko user not found for 'xxxx'
2018-12-10 17:05:37 INFO    x.x.x.x   functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for 'xxxx'
2018-12-11 09:39:31 INFO    x.x.x.x   functions_dolibarr::check_user_password_dolibarr Authentification ko bad password for 'xxxx'

Ma regex qui devrait matcher ça :

^<HOST>.* Authentification ko.*$

Mais non, elle ne veut rien savoir. La date et l’heure sont détectées par fail2ban-regex, mais le reste, nada…

Une idée ?

Étrange, surtout que ta regex semble être correcte
^.* Authentification ko.*$

Je l’ai testé sur ce site : https://regex101.com/

Avec cette regex, cela semble marcher :

^.* <HOST> .* Authentification ko.*$

N’ai pas trop creusé le comment du pourquoi.

1 J'aime

Super, merci à vous deux, ça marche !