He, Guys,
was wondering if somebody could help me getting Fail2Ban working. Got the following:
added to jail.local
[bitwarden]
enabled = true
port = http,https
filter = bitwardenrs
action = iptables-allports[name=bitwarden]
logpath = /log/bitwarden.log
maxretry = 3
bantime = 14400
findtime = 14400
bitwardenrs.conf (inside filter.d folder):
# Named this way beacause the one bundled with fail2ban is outdated
# https://github.com/dani-garcia/bitwarden_rs/wiki/Fail2Ban-Setup
# - Set up logging to file > https://github.com/dani-garcia/bitwarden_rs/wiki/Logging
# - Set logging level to warn or error
# Logged in bwdata/logs/identity/Identity/log.txt
[Definition]
failregex = Username or password is incorrect\. Try again\. IP: <HOST>\. Username: .*\.$
ignoreregex =
added
-e LOG_FILE=/log/bitwarden.log -e LOG_LEVEL=warn -e EXTENDED_LOGGING=true
as extra parameter to bitwardenrs and mapped a folder for the log file. See also attachment.
To Let's Encrypt (or Swag) added the same mapped folder.
I can see the failed log in attemps in the log of bitwarden but F2B is not doing anything with it.
gr Piet