Inspired by this comment to try to learn what I’m missing.

  • Cloudflare proxy
  • Reverse Proxy
  • Fail2ban
  • Docker containers on their own networks

Another concern I have is does it need to be on a separate machine on a vlan from the rest of the network or is that too much?

  • Chewy@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 day ago

    Some I haven’t yet found in this thread:

    • rootless podman
    • container port mapping to localhost (e.g. 127.0.0.1:8080:8080)
    • systemd services with many of its sandboxing features (PrivateTmp, …)
    • ikidd@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      I assume #2 is just to keep containers/stacks able to talk to each other without piercing the firewall for ports that aren’t to be exposed to the outside? It wouldn’t prevent anything if one of the containers on that host were compromised, afaik.

      • Chewy@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 hours ago

        It’s mostly to allow the reverse proxy on localhost to connect to the container/service, while blocking all other hosts/IPs.

        This is especially important when using docker as it messes with iptables and can circumvent firewall like e.g. ufw.

        You’re right that it doesn’t increase security on case of a compromised container. It’s just about outside connections.

        • ikidd@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          6 hours ago

          I was getting more at stacks on a host talking, ie: you have a postgres stack with PG and Pgadmin, but want to use it with other stacks or k8s swarm, without exposing the pg port outside the machine. You are controlling other containers from interacting except on the allowed ports, and keeping those port from being available off the host.