Files
cacti/misc/fail2ban/jail.local
T
Thomas Vincent 3045b4665e Add fail2ban support for authentication failures (#7676)
* Add fail2ban support for authentication failures

Emit a fixed, machine-parseable AUTH FAILURE line (user, realm, ip, reason)
from the universal login-failure path and the 2FA branch, normalise the human
AUTH strings, and ship a fail2ban filter, jail example, and README. The IP
comes from get_client_addr(); a crafted username cannot forge fields.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test: resolve includes through Cacti path constants

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-08-31 17:02:27 -04:00

19 lines
600 B
Plaintext

# Example Fail2Ban jail for Cacti. Merge this into /etc/fail2ban/jail.local (or
# drop it in /etc/fail2ban/jail.d/cacti.local) and adjust logpath to your install.
#
# Copy misc/fail2ban/cacti.conf to /etc/fail2ban/filter.d/cacti.conf first.
[cacti]
enabled = true
filter = cacti
port = http,https
# Path to Cacti's log. This is the file behind the "path_cactilog" setting,
# by default <cacti>/log/cacti.log. Point this at your actual install.
logpath = /var/www/html/cacti/log/cacti.log
# Ban an address after this many failures within findtime.
maxretry = 5
findtime = 10m
bantime = 1h