No host in logs to use with Fail2ban
The documentation suggests the following regexp to use LL::NG logs with fail2ban:
failregex = Lemonldap\:\:NG \: .* was not found in LDAP directory \(<HOST>\)
Lemonldap\:\:NG \: Bad password for .* \(<HOST>\)
In my logs, I don't see any host at the end of the log lines :
Jun 26 14:58:05 ldap LLNG[30081]: [warn] foo was not found in LDAP directory
Jun 26 15:05:30 ldap LLNG[30075]: [warn] Bad password for username
And indeed, the code doesn't seem to include it:
# lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
$self->userLogger->warn("$req->{user} was not found in LDAP directory");
$self->{portal}->userLogger->warn("Bad password for $req->{user}");
# vs lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
$self->userLogger->notice(
"User $user has been disconnected from $mod ($req->{sessionInfo}->{ipAddr})"
) if $user;
Am I missing something ? Or is the documentation and code outdated ? Should we patch the log lines to include the user's IP ?