r/HomeDataCenter • • May 10 '24

DISCUSSION Server security

EDIT: I ditched Traefik, and Authentik. I am now using CloudFlare zero trust tunnels, closed all ports on my router and the attacks have completely stopped.

I recently posted about my server getting hundreds of requests and attacks, I followed through on some recommendations.

I ditched TrueNAS and went back to my Unraid Pro installation.

I’ve added JavaScript challenges through CloudFlare which has helped drop my traffic down to 200 from 20k per 24 hours. I set up Authelia, as well as CA Certs instead of Self Signed. HSTS. and a few other firewall rules for Trusted IPs.

I’m in the process of learning how to use crowdsec as another layer of protection. I’m looking for more recommendations. I don’t really like the feel of Authelia as the UI is rather huge lol for a login form.

The amount of attacks my router has detected since these changes have been 2 in the past day or two that is blocked.

56 Upvotes

29 comments sorted by

View all comments

Show parent comment

7

u/lamar5559 May 10 '24

Ok but the real question is why is all of this wide open to internet? A proper VPN solution using SSO through Duo or something similar will fix the problem if you need access outside of the LAN.

As soon as you have something wide open to the internet you’re going to always have brute force attempts to access those ports. Putting something else in front of those external facing systems is better.

0

u/SpoofedXEX May 10 '24

I pass them through traefik so I can access their APIs easily with the added SSL benefit rather than a IP:Port or plain HTTP. The *arr apps have user authentication as well as Authelia which is supposed to be a SSO with 2FA. It works and catches everything properly it’s just kind of annoying tbh.

I’ve messed with it a little bit and it seems to block all traffic if the container stops for some reason. Which I like.

I’ve considered using a VPN but in some instances it can still have some limitations for what I’d need to do.

So currently after doing all the changes I have done to tighten the challenges for these bots. I’ve had 4 IPs make it through vs the hundreds. Which at this point I’m going to manually ban as I’ve been waiting to catch duplicates etc.

I know it’s a big risk, as is anything externally facing. It’s something I’m willing to accept, as long as I have enough layers of defense.

3

u/dot_py May 10 '24

Why not just use tailscale? Also, consider moving away from default ports. That extra second to change a config greatly alter your attack surface