Docker docs:

Docker routes container traffic in the nat table, which means that packets are diverted before it reaches the INPUT and OUTPUT chains that ufw uses. Packets are routed before the firewall rules can be applied, effectively ignoring your firewall configuration.

  • jwt@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    Somehow I think that’s on ufw not docker. A firewall shouldn’t depend on applications playing by their rules.

    • qaz@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      ufw just manages iptables rules, if docker overrides those it’s on them IMO

      • jwt@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        Feels weird that an application is allowed to override iptables though. I get that when it’s installed with root everything’s off the table, but still…