Hi, i create the working jail and filter for fail2ban and traccar web login using debian 11/iptables/traccar 5.3
steps:
1 - Add new lines in /etc/fail2ban/jail.local:
[traccar-web-login]
port = 8082
enabled = true
filter = traccar-web-login
logpath = /opt/traccar/logs/tracker-server.log
maxretry = 10
2 - Create filter file: "/etc/fail2ban/filter.d/traccar-web-login.conf"
# Fail2Ban traccar filter
[Definition]
failregex = INFO: login failed.* <HOST>
ignoreregex =
# Author: Fabiano Gastaldi - ® BetaSete Tecnologia
3 - Restart fail2ban service:
sudo service fail2ban restart
First thanks for the info, it's useful for me.
Also:
- You have to enable logging level info.
- The amount of log data for info level sent to the log file is huge !
Be prepared related to storage space, IO speed, CPU, e.t.c.
Is there an other (better) way ?
To the development team:
Maybe a new setting for login/logout for logging to a different log file to enable/disable it could be useful to protect Traccar with Fail2ban.
Hi, i create the working jail and filter for fail2ban and traccar web login using debian 11/iptables/traccar 5.3
steps:
1 - Add new lines in /etc/fail2ban/jail.local:
2 - Create filter file: "/etc/fail2ban/filter.d/traccar-web-login.conf"
3 - Restart fail2ban service: