Skip to content

What's /usr/libexec/podman/rootlessport and how do I use it? #24022

Answered by sbrivio-rh
truh asked this question in Q&A
Discussion options

You must be logged in to vote

What is it for?

It provides integration with the built-in port forwarder provided by rootlesskit.

Can this be used to access lower range ports without root?

Not really, that's a kernel-imposed restriction if the process binding the forwarded ports lacks the CAP_NET_BIND_SERVICE capability. You can grant it to rootlessport:

setcap 'cap_net_bind_service=+ep' /usr/libexec/podman/rootlessport

in the same way as you can provide it to slirp4netns(1) or pasta(1). But I would rather recommend that you set the minimum port number you need as non-root via sysctl (as root), for example:

sysctl -w net.ipv4.ip_unprivileged_port_start=443

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@truh
Comment options

@sbrivio-rh
Comment options

@Luap99
Comment options

@sbrivio-rh
Comment options

Answer selected by truh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants