Skip to content
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

Fix binding to privileged ports 1 to 1023 #3038

Closed
wants to merge 1 commit into from

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Sep 4, 2018

What this PR does / why we need it:

When SSL passthrough is enabled (flag --enable-ssl-passthrough), the traffic on port 443 goes through the Go binary. The issue with this is that Go does not work with authbind.
Also, this PR adds the mapping to all the privileged ports to allow nginx to bind any port, not only 80 and 443

Which issue this PR fixes:

fixes #2994
fixes #3037
fixes #3036

Edit: add note that --enable-ssl-passthrough requires a docker graph with support for setcap

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 4, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 4, 2018
@aledbf aledbf mentioned this pull request Sep 25, 2018
@aledbf aledbf closed this Sep 25, 2018
@aledbf aledbf deleted the fix-tcp-udp branch October 10, 2018 14:53
@johan-smits
Copy link

This is not fixed. Last known version that work is: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.17.1

@aledbf
Copy link
Member Author

aledbf commented Jan 11, 2019

This is not fixed.

@johan-smits can you be more specific? Please open a new issue with the details pleass

@anilraut30
Copy link

@aledbf , while trying to bind port < 1023 for TLS getting below error.

using aws nlb and have certs inside container in which case I assume pass-through isn't applicable.

nginx: the configuration file /tmp/nginx-cfg632096686 syntax is ok
2019/01/23 17:46:58 [emerg] 97#97: bind() to 0.0.0.0:990 failed (1: Operation not permitted)
nginx: [emerg] bind() to 0.0.0.0:990 failed (1: Operation not permitted)
nginx: configuration file /tmp/nginx-cfg632096686 test failed

Tried: upgraded image to quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0

@johan-smits
Copy link

johan-smits commented Jan 25, 2019

@anilraut30 I had the same issue, could you open a new issue? I did not had the time do reverse the setup back (it is running production now).

Going back to the version I mentioned you can make it work.

@johan-smits
Copy link

@aledbf I have reproduced the error and files a issue at #3732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tcp-services failed ingress-nginx-controller CrashLoopBackOff Ingress controller not starting
4 participants