Replies: 1 comment
-
podman 3.4.4 in ancient and not something we support. We only support the latest upstream version. In particular when you use podman 5.3 with a recent pasta then host.containers.internal should always work: https://blog.podman.io/2024/10/podman-5-3-changes-for-improved-networking-experience-with-pasta/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to set up a rootless Podman environment with containers in the same pod that can communicate with each other, access a non-containerized Java application on the host, and allow the host to communicate with the containers. Here’s the setup and all the steps I’ve tried.
Environment:
Host OS: Ubuntu 22.04.5 LTS
Podman Version: 3.4.4
OS/Arch: linux/amd64
Setup: Rootless Podman, single pod with multiple containers
Goal: I want:
Network Configuration:
0.0.0.0:10443->1443/tcp
,0.0.0.0:13000->3000/tcp
,0.0.0.0:13306->3306/tcp
,0.0.0.0:14000->4000/tcp
,0.0.0.0:18080->8080/tcp
,0.0.0.0:18888->8888/tcp
,0.0.0.0:19201->9201/tcp
,0.0.0.0:11234->12345/tcp
,0.0.0.0:13270->32700/tcp
Host Service:
0.0.0.0:8080
, confirmed to be running withss -tuln | grep 8080
.What I Tried:
Pod Creation with Exposed Ports:
-p
or--publish
flags, since all network configurations are handled at the pod level.Host-to-Container and Container-to-Container Communication:
localhost:<host_port>
.localhost:<port>
.Container-to-Host Communication Attempts:
curl http://host.containers.internal:8080
andcurl http://10.88.0.1:8080
(after confirming10.88.0.1
as the gateway IP for Podman’s default network).10.0.2.2
and10.0.2.100
.8080
from within the containers, despite the service running on0.0.0.0:8080
on the host.Firewall and SELinux Checks:
Using
--network slirp4netns:allow_host_loopback=true
:--network slirp4netns:allow_host_loopback=true
to allow loopback access:http://host.containers.internal:8080
or any other expected IP.Host DNS Resolution:
host.containers.internal
inside the container using:10.0.2.100
but still unable to reach the host service.Attempting to Use
--network host
as a Workaround:--network host
(not officially supported in rootless Podman):Summary of Problem:
Container-to-host communication does not work in rootless Podman, despite following various troubleshooting steps. I have confirmed that the service is accessible on
0.0.0.0:8080
on the host, but containers cannot connect to it usinghost.containers.internal
, the gateway IP, or other Podman-recommended methods.Question:
How can I enable container-to-host communication in rootless Podman? Is there a reliable way to access a host service from containers in a rootless Podman pod, given that the service is listening on all interfaces (
0.0.0.0
) on the host?Let me know if there's any other information I should add.
Beta Was this translation helpful? Give feedback.
All reactions