New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted #19538
Comments
|
You can not bind to ports less then 1024 in rootless mode, without changing a sysctl. |
|
https://github.com/containers/podman/blob/main/rootless.md |
|
I know. This is why I set -p to 5353. But I get the above. |
|
No one responds in #podman, and I can't reopen this bug, so I guess I have to make another one. |
|
Have you tried to enable all caps to see if this is a capability issue. CAP_NET_RAW or CAP_NET_ADMIN would be the likely ones I would try. |
|
Because it grants podman more capabilities than should be needed for the problem at hand. It also means that I have to trust that podman does in fact drop privileges correctly. IOW -p does not behave as advertised. It is supposed to allow a container to run in userland, and within that container services to be run as 'root' inside that container --in this case unbound-- which then listens in the container on 53. And --publish ostensibly connects that 53 to host 5353 so as to not violate the rights allowed to the container user. But it doesn't really work that way evidently... |
|
I think you are confusing things here, you do not grant podman the real CAP_NET_ADMIN. We already have this in our userns anyway, you must pass From
|
Issue Description
$ podman run --name unbound -i -t --rm --publish 10.2.1.1:5353:53/tcp --publish=10.2.1.1:5353:53/udp -v /home/bill/unbound:/etc/unbound:ro,Z --tls-verify=false 127.0.0.1:5000/unbound
Trying to pull 127.0.0.1:5000/unbound:latest...
Getting image source signatures
Copying blob 8cdb2790ef24 done
Copying blob 843118f807a2 done
Copying blob a67f38f81ae8 done
Copying blob 9e27f648e5c1 done
Copying config 361b11ebcc done
Writing manifest to image destination
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Aug 07 14:54:08 unbound[1:0] warning: setsockopt(.. IP_TRANSPARENT ..) failed: Operation not permitted
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
IP_TRANSPARENT ..) failed: Operation not permitted
Describe the results you expected
For the container to start
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
MicroOS (OpenSUSE Tumblewed)
$ podman version
Client: Podman Engine
Version: 4.6.0
API Version: 4.6.0
Go Version: go1.20.7
Built: Wed Aug 2 17:00:00 2023
OS/Arch: linux/amd64
$ rpm -q podman
podman-4.6.0-2.1.x86_64
cat unbound.imgbuild
FROM docker.io/alpinelinux/docker-cli
RUN apk --update --no-cache add
unbound &&
mkdir /run/unbound && chown root:unbound /run/unbound && chmod 770 /run/unbound &&
touch /var/log/unbound.log && chown root:unbound /var/log/unbound.log && chmod 664 /var/log/unbound.log
#openssl \
WORKDIR /etc/unbound
EXPOSE 5353
ENTRYPOINT ["/usr/sbin/unbound", "-d"]
setsebool -P container_manage_cgroup true
podman run --name unbound -i -t --rm --publish 10.2.1.1:5353:53/tcp --publish=10.2.1.1:5353:53/udp -v /home/bill/unbound:/etc/unbound:ro,Z --tls-verify=false 127.0.0.1:5000/unbound
Additional information
Issue is consistent.
The text was updated successfully, but these errors were encountered: