-
I cannot use ISC DHCP Server with rootless podman. I made sure that podman is allowed to expose on unprivileged ports.
I created a minimal Dockerfile for starting ISC DHCP Server # Dockerfile
FROM debian:latest
RUN apt-get update
RUN apt-get install -y isc-dhcp-server iproute2
COPY dhcpd.conf /etc/dhcp/dhcpd.conf
COPY dhcpd.leases /var/lib/dhcp/dhcpd.leases
CMD ["/usr/sbin/dhcpd", "-f", "-d", "-cf", "/etc/dhcp/dhcpd.conf", "-lf", "/var/lib/dhcp/dhcpd.leases", "--no-pid"]
I am not sure if using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I don't think this is possible in the host network namespace, while you can add capabilities inside the container the kernel knows that you (a user) is not allowed to modify the host network namespace. Rootless podman cannot gain more privileges that your user already has so it is impossible to modify the host network namespace or open a raw socket in it. If it were this would be a huge security problem. I think the only way to make it work is to run podman as root. |
Beta Was this translation helpful? Give feedback.
I don't think this is possible in the host network namespace, while you can add capabilities inside the container the kernel knows that you (a user) is not allowed to modify the host network namespace.
Rootless podman cannot gain more privileges that your user already has so it is impossible to modify the host network namespace or open a raw socket in it. If it were this would be a huge security problem.
The sysctl allows you only to bind low ports, e.g. udp or tcp but I think dhcp requires a raw socket so it shouldn't matter in this case.
I think the only way to make it work is to run podman as root.