Use ss -tlpn
or podman ps
to show what ports podman is listening on, my guess is it is only listening on localhost.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
podman ps shows the following:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
daae60bdcc65 docker.io/library/caddy-caddy:latest caddy run --confi... 47 minutes ago Up 47 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:5050->443/tcp, 2019/tcp, 443/udp caddy
netstat -tunpl
shows the following:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5025 0.0.0.0:* LISTEN 3270/sshd: /usr/sbi
tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN 7342/conmon
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7342/conmon
tcp 0 0 10.89.0.1:53 0.0.0.0:* LISTEN 7336/aardvark-dns
tcp6 0 0 :::5025 :::* LISTEN 3270/sshd: /usr/sbi
udp 0 0 10.89.0.1:53 0.0.0.0:* 7336/aardvark-dns
The only difference for the netstat command between Docker and Podman is that Podman show's entries for aardvark-dns and Docker does not which is something I expect.
Disable the firewall if you can to check if that's the issue, then do a tcpdump using root with the port. Do tcpdump inside the container too and compare what you see to the docker environment.
Is caddy-caddy really the correct image?
Try with this command, it's the minimal setup that works by default (on my machine): podman run -p 0.0.0.0:5050:80 docker.io/library/caddy:latest
Connections timing out have always been a firewall issue for me.
Client sends packet, firewall drops packet, client waits for a reply that'll never come. Client times out.
I would check firewall logs or temporarily disable it to see if it works without it.
so yeah check the firewall on the server, the client and in between ( if any ). That's what I would do.
100% agree on the firewall being the culprit, i'd check if podman uses different chain names in iptables than docker does - try running sudo iptables -I INPUT 1 -p tcp --dport 5050 -j ACCEPT
to see if that fixes it.