Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-72937

firewalld 2.2.1 → 2.3.0 blocks local podman ports (RHEL 10 only)

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Blocker Blocker
    • rhel-10.0
    • rhel-10.0
    • firewalld
    • firewalld-2.3.0-2.el10
    • Yes
    • Important
    • rhel-net-firewall
    • ssg_networking
    • 26
    • 3
    • Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • None

      Cockpit's recent RHEL 10.0 image refresh found a regression in firewalld: With 2.3.0, locally exposed podman ports are now inaccessible. The image build log has the full package version diff at the bottom, but the most likely one is firewalld 2.2.1 → 2.3.0. In particular, podman itself did not update (podman-5.3.1-3.el10.x86_64 on both the old and new image).

      Please provide the package NVR for which the bug is seen:

      podman-5.3.1-3.el10.x86_64
      firewalld-2.3.0-1.el10.noarch

      How reproducible is this bug?:

      Always

      Steps to reproduce

      podman run -d --rm -p 5000:5000 --name registry quay.io/libpod/registry:2.8
      curl http://localhost:5000/foo
      

      Expected results

      curl should fail with "404 page not found". (Of course that curl is bogus, and you'd really use that registry with some podman push or similar. But that's not relevant here).

      Actual results

      > curl: (7) Failed to connect to localhost port 5000 after 0 ms: Could not connect to server

      That happens because port 5000 is now blocked by default by firewalld. That wasn't the case before, thus breaks a long-standing existing behaviour. It doesn't sound sensible at first – a firewall should mediate trust relations between machines, not services inside a single machine.

      However, if that was deliberate, it is still hard to work around: I tried all three of

      firewall-cmd --zone=trusted --add-port=5000/tcp
      firewall-cmd --zone=public --add-port=5000/tcp
      firewall-cmd --add-port=5000/tcp
      

      But none helps (the latter says "already enabled"). The only thing that does help is systemctl stop firewalld.

              egarver Eric Garver
              rhn-engineering-mpitt Martin Pitt
              Eric Garver Eric Garver
              Tomas Dolezal Tomas Dolezal
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: