-
Notifications
You must be signed in to change notification settings - Fork 5
Allow listening of port < 1024 #52
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
base: main
Are you sure you want to change the base?
Conversation
|
Interesting thank you for your PR. Could you elaborate your use case for that a bit more? |
|
Sure, we have dedicated nodes running Nomad server role + NACP combination. Nomad servers are configured to listen HTTP only from localhost https://github.com/olljanat/nomad-simplified/blob/main/nomad.d/global.hcl#L5-L7 and NACP handles HTTPS in standard port so users connecting to Nomad does not need remember port number: https://github.com/olljanat/nomad-simplified/blob/main/nacp/nacp-config.hcl#L1-L12 It can be also combined with CoreDNS’s Nomad plugin (which I recently upstreamed) so that Nomad UI and API are available with single URL without need for external load balancer. |
|
interesting As I currently cannot tell what side effects this has compared to the current dockerfile. |
No side effects, kernel simply will allow listening port numbers < 1024 by NACP binary even when it is running as non-root. It is explained in https://stackoverflow.com/a/414258
Can if you want but don’t see the point to be honest. |
|
Ok, I'm currently trying to verify this locally And running it where I definitly see the permission dinied error when i run it without this line and it starts if I include it. |
|
Try Name “localhost” defaults to IPv6. |
|
sorry for the delay, seems not to work on my mac. should it? |
|
You mean that it breaks build or usage in Mac or that does not allow listen port < 1024 ? My knowledge about Mac world is very limited but IIRC it is based on BSD which why Linux based solutions does not directly work in there. |
I prefer to publish NACP from standard HTTPS port 443 but as result of e8d5780 it does not work anymore.
Solution is to set extra capability for binary like example CoreDNS does https://github.com/coredns/coredns/blob/v1.13.1/Dockerfile#L15