Fail2ban Installation Process reddit / selfhosted ---------------------------------------------------------------------- Kaziopu123 · 2023-10-06 16:10 Hi everyone, I hope you're doing well. I have installed fail2ban and did this: 1. Created 'jail.local' in /etc/fail2ban 2. Added this in 'jail.local' [vaultwarden] enabled = true port = http, https filter = jellyfin logpath = /path/to/logs/jellyfin.logs maxretry = 3 bantime = -1 3. Created 'jellyfin.conf' in /etc/fail2ban/filter.d and added this [Definition] failregex = Authentication failed: .* from ignoreregex = 4. Restart fail2ban Am I doing this right? Need your help. Thank you. ---------------------------------------------------------------------- thekrautboy · 2023-10-06 16:25 /r/LinuxQuestions /r/Linux4Noobs ---------------------------------------------------------------------- austozi · 2023-10-06 21:09 Is this config for vaultwarden or jellyfin? The config seems to mix up the two. I publish my fail2ban configs here, might be useful: https://github.com/austozi/selfhosted ---------------------------------------------------------------------- Kaziopu123 · 2023-10-06 21:21 Sorry my bad. I have mistakenly wrote vaultwarden on the third bracket here. But the config is for jellyfin. I have created 'jellyfin.conf' in /etc/fail2ban/filter.d, shall I change it to 'jellyfin.local' too? ---------------------------------------------------------------------- austozi · 2023-10-06 21:34 As I understand, both .local and .conf will work but .local is usually used for custom configs because .conf files may be overwritten upon update if they are shipped with the distro. Best way to find out is to test out the config by deliberately entering the wrong login credentials. If you're hosting on-prem, you can use Tor Browser so you don't ban your own IP, although if you do end up banning your own IP, you could also easily unban it (e.g. via SSH). I just like the convenience that the Tor Browser provides. ---------------------------------------------------------------------- HostileHarmony · 2023-10-07 14:26 This repo looks great! I’ll definitely be referencing it in the future, thanks a lot