I have everything I host and expose behind authelia (which requires 2fa) as middleware or as the only login method with oicd, thus far it seems to work well, of course I get a bunch of malicious traffic and spam but this gets to authelia and stops there, I don’t even see multiple tried login tries ever so I felt pretty safe. However it does seem that everyone uses either fail2ban or crowdsec in addition so I have been wondering if it would really add any security in my setup or if I’m missing something. I’m sure it wouldn’t hurt but crowdsec always seemed a little too complex for me and I don’t want something I don’t fully understand in my security layer and I never saw a nice way to setup fail2ban so never bothered. Afaik there’s no webui or such things and you have to manually make working regex for everything. I’d like to know if I’m missing something or if anyone has tipps to give
Fail2ban is just another tool in your toolbox. Defense in depth, as others mentioned.
Fail2ban is primarily a tool to prevent brute force attacks, especially useful for services that don’t do their own throttling. For example I usually put ssh in fail2ban, but if Authelia’s built-in protection is good enough, then use that.
Outside ssh, anything that could be used to brute force credentials should be in fail2ban if they’re exposed: web sites with simple auth, mail, etc.
Arda@piefed.social
wreckedcarzz@lemmy.world
DieserTypMatthias@lemmy.ml
Ooops@feddit.org
shininghero@pawb.social
Generally, your auth provider (assuming setup correctly) should be one of the most secure components of your internet-exposed setup. That being said, vulnerabilities can and do occur. Adding a combination of Crowdsec, OWASP CRS, other ModSecurity rulesets, and/or fail2ban will add a degree of migitation of potential exploits by blacklisting known bad actors/active bad behavior.
Above all, you should have a plan to keep aware of updates to your publicly-exposed software and be able to deploy those updates in a timely fashion.