Replies: 3 comments 3 replies
-
You are likely missing that you have to open the port in your firewall. As rootless we have no permissions to reconfigure the firewall so this needs extra configuration on the system. |
Beta Was this translation helpful? Give feedback.
-
i also meet this quesiotn in bedian12 (wsl2). ➜ podman -v
podman version 4.9.3
➜ podman run --rm -p 80:80 docker.io/svenstaro/miniserve:alpine -p 80 /
➜ ss -tlnp6
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 *:80 *:* users:(("rootlessport",pid=8760,fd=11))
LISTEN 0 128 [::]:29173 [::]:*
➜ ss -tlnp4
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:29173 0.0.0.0:* how if i use podman machine based on wsl2 ( fedora 39), it works well. ➜ podman -v
podman version 4.9.0
➜ ss -tlnp6
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 *:80 *:* users:(("rootlessport",pid=1395,fd=11))
LISTEN 0 128 [::]:29173 [::]:*
➜ ss -tlnp4
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 0.0.0.0:80 0.0.0.0:* users:(("rootlessport",pid=1395,fd=11))
LISTEN 0 128 0.0.0.0:29173 0.0.0.0:* For Linux, since the v6only_setting parameter is turned off by default, an IPv6 socket can handle IPv4 traffic as well. However, there's an annoyance on WSL2: in NAT mode, WSL2 only maps IPv6 ports to so i just wants to know why |
Beta Was this translation helpful? Give feedback.
-
Maybe a stupid question, but I couldn't find any info on this one.
Say I run the following:
podman run -d -p 8080:80 --name nginx nginx:latest
`netstat -tulpn`` gives the following
As you can see, it only binds to the IPv6, but not IPv4. This results in not being able to access the server from the LAN (http://192.168.1.20:8080).
On the other hand, if I run the same command as
sudo podman run -d -p 8080:80 --name nginx nginx:latest
this works just fine, since it binds to IPv4Am I missing something here?
Beta Was this translation helpful? Give feedback.
All reactions