Unable to connect to remote host: No route to host
ocafebabe opened this issue · 1 comments
ocafebabe commented
Hi,
I'm running a rootless podman container with the default network setting (which is using slirp4netns) and I can't reach an external host because it's on the same subnet as the container:
telnet 10.0.2.103
Trying 10.0.2.103...
telnet: Unable to connect to remote host: No route to host
It works if I switch to host networking mode but I would rather stay with the default one.
Is there some sort of workaround to make this work? I did a lot of Googling and didn't find anything...
Thanks,
Christian
ocafebabe commented
Never mind, I was able to get around the issue by passing a custom CIDR to slirp4netns, e.g.:
podman run --rm -it --network=slirp4netns:cidr=10.0.5.0/24 ubuntu:20.04 bash
Sorry for the disturbance...