Whilst building a firewall policy for my environment using firewalld, I came across the FirewallD integration for Netavark and enabled it by setting "NETAVARK_FW=firewalld" in /etc/environment to be able to control the Container networking better. I then tried to reach some of my published ports of my webserver, but interestingly, i was only able to reach my container services from from remote, e.g. from another device in the same network. Requests coming from the container host directly are hanging after the TCP Handshake.
Steps to reproduce the issue
Steps to reproduce the issue
Set up a new Instance of Rocky Linux or RHEL 9.2 with podman and firewalld installed
Run a rootfull container serving HTTP: sudo podman run --rm -d --publish 8080:8080 nginxinc/nginx-unprivileged:1.25
Run curl on the same host as the container is running on, using any IP address bound on any local interface (using localhost for simplicity here, but all local addresses are showing the same hanging behaviour): curl -v 127.0.0.1:8080 --max-time 10
Watch as curl does a tcp handshake, but then hangs for 10s
Describe the results you received
curl seems to be able to connect, but then hangs after requesting a page:
$ curl 192.168.10.1:8080 -v --max-time 10
* Trying 192.168.10.1:8080...
* Connected to 192.168.10.1 (192.168.10.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: 192.168.10.1:8080
> User-Agent: curl/7.76.1
> Accept: */*
>
* Operation timed out after 10001 milliseconds with 0 bytes received
* Closing connection 0
curl: (28) Operation timed out after 10001 milliseconds with 0 bytes received
Describe the results you expected
curl shows a HTTP Response almost immediately:
$ curl 192.168.10.1:7011 -v --max-time 10
* About to connect() to 192.168.10.1 port 7011 (#0)
* Trying 192.168.10.1...
* Connected to 192.168.10.1 (192.168.10.1) port 7011 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.10.1:7011
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.25.2
< Date: Fri, 29 Sep 2023 08:02:14 GMT
< Content-Type: text/html
< Content-Length: 615
< Last-Modified: Tue, 15 Aug 2023 17:03:04 GMT
< Connection: keep-alive
< ETag: "64dbafc8-267"
< Accept-Ranges: bytes
<
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
* Connection #0 to host 192.168.10.1 left intact
Issue Description
Whilst building a firewall policy for my environment using firewalld, I came across the FirewallD integration for Netavark and enabled it by setting "NETAVARK_FW=firewalld" in /etc/environment to be able to control the Container networking better. I then tried to reach some of my published ports of my webserver, but interestingly, i was only able to reach my container services from from remote, e.g. from another device in the same network. Requests coming from the container host directly are hanging after the TCP Handshake.
Steps to reproduce the issue
Steps to reproduce the issue
sudo podman run --rm -d --publish 8080:8080 nginxinc/nginx-unprivileged:1.25
curl -v 127.0.0.1:8080
--max-time 10Describe the results you received
curl seems to be able to connect, but then hangs after requesting a page:
Describe the results you expected
curl shows a HTTP Response almost immediately:
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Running on a physical intel machine.
Additional information
No response