I have a few rootless podman containers running, which are listening on some unprivileged (>1024) ports. Instead of running a container with privileges, I decided to map these ports to their expected values using firewalld:
sudo firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080
sudo firewall-cmd --add-forward-port=port=443:proto=tcp:toport=8443
And it’s working as expected, I can access the server on HTTP and HTTPS from other machines.
To create an OAuth2/OpenID SSO service, some of the containers need to talk to the server, and this is where I am running into trouble: I can’t access these ports from within the machine:
curl http://127.0.0.1
curl http://192.168.0.12
don’t seem work on the host itself.
Is there a way to forward these ports on these internal/loopback connections, too?