On 10/11/2021 10:54, Foo Bar wrote:
Hi,
I use Fail2Ban v0.11.2 on my OpenBSD 7.0 server.
The date/time of events in fail2ban.log looks like unix timestamps:
+86282700 2876576C40 fail2ban.filter INFO [iplog] Found 89.248.165.247 - 2021-11-10 11:33:53
+86283319 2876576040 fail2ban.actions WARNI [iplog] 89.248.165.247
already banned
+86624673 2876576C40 fail2ban.filter INFO [iplog] Found
185.156.73.17 - 2021-11-10 11:39:35
+86624866 2876576040 fail2ban.actions WARNI [iplog] 185.156.73.17
already banned
I could not find the option to log in a human readable time format instead and
I appreciate any suggestions to solve this.
Best
Thomas
Not sure when using fail2ban's own logging (however see
https://github.com/fail2ban/fail2ban/issues/1980), but I set
[Definition]
logtarget = SYSLOG
in fail2ban.local and then logging is handled by the system logging
tool. If this is rsyslog it uses a standard date/time format or you can
set your own with customformat in /etc/rsyslog.conf e.g.
$template
CustomFormat,"%timegenerated:::date-year%-%timegenerated:::date-month%-%timegenerated:::date-day%
%timegenerated:::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second%
%HOSTNAME% %syslogtag%%msg%\n"
$ActionFileDefaultTemplate CustomFormat
_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users