-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect IP for host.containers.internal when using a bridge network #22644
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Comments
Are you running rootless? |
Yes, I'm running rootless. When did this start happening?I noticed this bug after I upgraded to Fedora Silverblue 40. I installed Silverblue 39 on a virtual machine and can confirm that it works as expected (the correct IP address appears in
|
Duplicate of #22653 |
stale-locking-app
bot
added
the
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
label
Aug 12, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Issue Description
When running a container on a bridge network, the IP address listed in
/etc/hosts
file in the container for the hostshost.containers.internal
andhost.docker.internal
is incorrect (even though the host can still be accessed using the correct IP address).Steps to reproduce the issue
Host OK
.alpine-with-curl
is the followingContainerfile
:When not using a network, the correct IP address of
10.89.0.1
is in/etc/hosts
and the cURL command succeeds.When attaching the container to a bridge network, an incorrect IP address of
192.168.1.174
is in/etc/hosts
and the cURL command fails (that IP happens to be the ethernet address of the host on my home network).However, using the
10.89.0.1
from before does work:Describe the results you received
Unable to determine from inside the container the correct IP to use to access the host (eg, for remote debugging tools, etc).
Describe the results you expected
I expect the correct IP to access the host from inside the container to be in
/etc/hosts
.If this is by design, perhaps for security reasons regarding mixing host and bridge networks, then I would expect using the
10.89.0.1
address to not be able to access the host at all, rather than by obfuscating the value in/etc/hosts
.podman info output
podman info
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Have only tested this issue on
x86_64
.Additional information
/etc/containers/containers.conf
The text was updated successfully, but these errors were encountered: