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!

  • mlg
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 hours ago

    Sorta depends because firewalld has proper firewall zones, and docker uses its own zone name if firewalld is installed.

    Usually the default policy on distros that use firewalld will also apply the same base ruleset to the docker zone (or preconfigured zone rules for docker), in which case it should work out of box.

    If its Ubuntu, you might need to add a rule manually, but at least the rule will apply to docker traffic instead of getting completely bypassed like UFW.

    My question is, who thought this was acceptable behavior at docker?

    Exactly lol. I use podman and it does a much better job of integrating with the firewall with netavark.

    The fact that Docker hasn’t bothered to fix this or use common OCI standards is why I don’t reccomend using it at all over podman.