-
Hello! On first blush I thought this might be a bug in the container or something, but I thought I'd start here since it's certainly possible it's just something funky in my setup. I'm running a microk8s cluster, and my attempts at deploying dnsdist were failing due to the aforementioned error. Of course this lead me to the needed capabilities, which I tried with a simple pod definition:
This still fails to bind to port 53:
Even if I blast the permissions wide open with |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Explored the notion that it might just be grouchy that it's trying to bind to all interfaces, so I narrowed it down - still the same issue:
|
Beta Was this translation helpful? Give feedback.
-
OK, I was originally avoiding the sysctl approach because I thinking "oh no sysctl mods hacky/bad for security" when I realized that the "NET_BIND_SERVICE" is basically doing the same thing. So a minor tweak here and this works:
I'll leave this discussion open since I'm still kind of curious why the |
Beta Was this translation helpful? Give feedback.
-
Hi, With docker you'll need to add the parameter net.ipv4.ip_unprivileged_port_start directly to your sysctl.conf on the machine running your container to allow the use of ports below 1024 by a user other than root. For example: root@machine:~# cat /etc/sysctl.conf Then root@machine:~# sysctl -p I tried all the other methods, and this is the only one that worked for me, or alternatively by explicitly specifying the root user to run your container (I would not recommend that at all). |
Beta Was this translation helpful? Give feedback.
OK, I was originally avoiding the sysctl approach because I thinking "oh no sysctl mods hacky/bad for security" when I realized that the "NET_BIND_SERVICE" is basically doing the same thing. So a minor tweak here and this works:
I'll leave this discussion open since I'm still kind of curious why the
NET_BIND_SERVICE
approach wasn't working, if anyone has any ideas (and i…