has anyone an easy way to harden self hosted Bitwarden with Fail2Ban?
I have tried in vain. I have read many posts but Fail2Ban never blocked.
The filter was correct and trying with
fail2ban-regex /root/bwdata/logs/identity/Identity/log.txt /etc/fail2ban/filter.d/bitwarden seemed to catch the correct lines. But the Jail never worked.
This is the standard self hosted BW running on Dietpi (debian).
I think this is your problem, @manilx - your server is using RPi hardware, right? That can’t be a Bitwarden standard server install. That software does not run on ARM devices. You must be running server software created and distributed by someone other than Bitwarden. Could you please take your questions to their support community?
I believe just from the naming of the Distro itself, there are so many too many to know them all
But from what I can tell Dietpi is specialized to run on something even lightweight as a rRaspberry Pi and has ARM support, though if yours is on a Proxmox VM (hey another Proxmox homelabber) then it’s most likely running on the x86 which is also provided.
I believe David was just confused from the naming, as Bitwarden’s standard installer does not support ARM (but their new Unified beta does), though there has been much confusion on the topic as before the Unified beta, there are other 3rd party server software designed to look like an run Bitwarden clients.
Many articles incorrectly label these as being the same, but they are not and developers from both sides have attempted to make this clear, unfortunately there is still much confusion about it in the official community here.
Though steps are being taken to make the distinctions clearer as well for their respective communities. If you have any issues with the official product anyone in this community is glad to help. Even in the 3rd party communities, I have seen much engagement and support just wanting to be sure each product is being supported probably.
I do use dietpi ontop of standard Debian11 on a X86 VM.
It removes A LOT of unneeded stuff and has build-in commands/scripts for 90% of daily admin jobs (backup, drive manager etc). So much easier than fiddling with bare bones Debian.
Anyway I install Fail2Ban via their software install (again because its easy and you can uninstall it). It blocks ssh etc just fine.
But Bitwarden is escaping me.
Adam from Bitwarden support suggested I post here if someone has tackled this:
" While our support channel is primarily intended to support Bitwarden installations, I appreciate that fail2ban is a popular tool in the self-hosting community, and having a viable configuration would be useful for our users."
Sounds good, and I think that’s a smart idea to use this distro for a lightweight VM.
This is a bit off-topic, so I hope you don’t mind, but why run the full BW docker stack rather than the BW unified docker container if you are trying to minimize your resource footprint on Proxmox? I recognize that the unified server is still in Beta, but it appears to be getting good reviews so far.
no special reason at all! I actually was using BW cloud (paid) and moved to Vaultwarden self-hosted because dietpi has an install for it and its one-click. I also had fail2ban working fine and blocking all false login attempts.
But then I saw a video from Lawrence Systems with howto install BW via Docker and I am a paying customer of BW. This is what I’ve done. Not that difficult also once I had that help.
I’ve seen the beta but as there was no hand holding I haven’t done that one.
I’m no Docker specialist or fan, need step by step info on that…
If that’s the case, you might try restarting the container. That may ‘kickstart’ things. Otherwise, you may have missed configuring something when you performed the initial setup. Did you follow the install instructions on Bitwarden.com? If so, I would be tempted to remove the container and just try again.
Hey @manilx feel free to share the issue you ran into with Unified, on the Github repo as a bug report:
While the Bitwarden unified deployment remains in beta release, we encourage you to report issues and give feedback via GitHub. Please use this issue template to report anything related to your Bitwarden unified deployment and check out this page to track known issues or join the discussion.