When you spin up a fresh public Linux instance, automated scanners start knocking on your doors within milliseconds.

It doesn’t take much to get locked down properly, but missing a few basics can leave you exposed.

I’ve put together a straightforward guide covering the essential hardening steps from UFW and SSH key-only auth to secure Docker bindings and automated maintenance.


Original content by The Unknown Universe, written by a human and not AI generated!

  • TrollAccount69@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    44 minutes ago

    Yeah the Unix permissions model is insecure, acls have been around forever to deal with that.

    No one is suggesting to just force people to use sudo as a security measure. What I said was that using a nonstandard admin user account with other accounts disallowed from ssh access will prevent lots of intrusions because people are generally just running credential spam attacks and your weird admin account isn’t in them.

    Seriously look at your logs, it’s all generic well known accounts on port 22. You could prevent doorknob jigglers from getting in just by switching to a high port, disallowing all but one weird admin user and doing key as opposed to password. Fail2ban isn’t even really needed at that point and neither is port knocking.

    A user may be able to do a lot of damage (less with layered security or defense in depth) but the real benefit of sudo is that aside from being unlucky enough to be using musl ssh, asterisk root lets you be incredibly obscure and that does a lot to keep the rabble out.

    A while back I remembered the “would that end racism? Would that end sexism?” moment and I think a lot of your comment strays close to that territory. Ddos attacks are generally not the purview of how system administration is conducted, they are handled by cdns and infrastructure. Physical security is not the top priority of most server administrators (not because it isn’t important but because a vps in a container on a hypervisor running on a server in a rack in a datacenter with locks and cameras all around is in a much different situation than your laptop while you use the Starbucks bathroom, to be 100% clear).