Replies: 2 comments 2 replies
-
|
Regarding Another alternative: Using socket activation in a systemd system service with Update: I modified the link so that it now points to the discussion thread. |
Beta Was this translation helpful? Give feedback.
-
|
One common approach is to run the rootless container on an unprivileged port, and rewrite requests on privileged ports to the unprivileged ones using a firewall. To do that there are two common approaches:
The firewalld solution is pretty simple, simply run But note that it only works for connections from the outside. You won't be able to access your public ports from the host or from inside other containers. So, if you need that capability, say for something like OAuth/OpenID, you have to chose the nftables solution: Put in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Aware that 5.4.2 is not the latest, but I use Debian stable for some production workloads and that's what's currently in the repos :)
This may be an OS issue or related tools, not podman, I don't know, but asking here for some guidance as to what could be the cause.
Summary of Issue
On Debian 13 (Trixie) with Podman v5.4.2, rootless containers defined via Quadlets cannot bind to privileged ports using the standard secure methods (
setcaporping_group_range). The only successful method is to lower the system-widenet.ipv4.ip_unprivileged_port_startvalue.Steps to Reproduce
.containerfile.AddCapability=NET_BIND_SERVICE.pastanetwork driver, running as a non-root user, could not bind to the host port.Network=slirp4netns.rootlessporthelper process errored withbind: permission denied, indicating it lacked permission on the host.sudo setcap 'cap_net_bind_service=+ep' /usr/libexec/podman/rootlessport.permission deniederror fromrootlessport.setcapand used the alternativesysctlmethod:sudo sysctl -w net.ipv4.ping_group_range="0 0".permission deniederror fromrootlessport. No AppArmor denials were logged.sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80.Conclusion
The expected behavior is that either
setcaponrootlessportor settingping_group_rangeshould allow rootless Podman to bind to privileged ports. As neither method worked, it suggests a potential regression or incompatibility within Podman or its interaction with the kernel/security policies on Debian 13.Beta Was this translation helpful? Give feedback.
All reactions