-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Whitelist not working #2096
Comments
@mvineza please use the issue template to provide context. |
@aledbf Looks like if Access log: FYI... if |
Correct, we just pipe the TCP connection to the backend. |
Do you think we can expose an option to not enable proxy protocol for HTTP? @aledbf |
Basically our load balancer does not use proxy protocol and its only |
Or we need to have the controller handle port 80, then forward to maybe 81 and wrap it with proxy protocol if |
@aledbf Done updating issue using the template. I confirm that the IP that is being shown on the nginx logs is the IP where I am connecting from which is from my laptop. |
@azweb76 It is not enabled. Here is the "deploy/nginx-ingress-controller" args
|
This is also a problem for me. I created the nginx ingress using helm and have a simple ingress like this
The ingress itself works ... all good, but there is no whitelisting kicking in ... I was expecting the nginx-controller pod to be reloaded with a deny config but theres nothing there... how does that work? |
@fripoli Unless you are starting the controller with the flag --annotations-prefix=ingress.kubernetes.io, please change the whitelist annotation to: nginx.ingress.kubernetes.io/whitelist-source-range |
thanks, that was the issue :) |
Not working in 0.15.0 |
I'm using quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.14.0 I'm always getting a 403 when I add nginx.ingress.kubernetes.io/whitelist-source-range : "x.x.x.x" where x.x.x.x is the Ip I get from https://whatismyipaddress.com. |
/assign @antoineco |
If I use a configmap like this one it works:
|
I'd confirm this, in my case was my mistake. |
@grebois could you confirm this is happening with the latest version when using the correct annotation prefix? ( @YvonneArnoldus that's most likely because NGINX interprets the incoming traffic as coming from a load balancer IP instead of your own IP, same comment as above. |
related: #2567 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@antoineco I wasn't able to test if it works or not anymore, now I only get the IP of the load balancer so that's a blocker, but will follow up on this as soon as possible, currently using 0.19.0. |
@grebois : what ip do you see in ingress logs (public, or private) ? |
Having same issue. In logs - private address (behind NAT) |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
ThxGod, this hlp a lot |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.): yes
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.): whitelist
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
NGINX Ingress controller version:
quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2
Kubernetes version (use
kubectl version
):Environment:
uname -a
):3.10.0-693.5.2.el7.x86_64
- Install tools:What happened:
I added a whitelist on our Ingress resource using the following YAML file:
I tried curl on the page and I was still able to access it.
some.ip.here - - [16/Feb/2018:01:37:45 +0000] "GET / HTTP/1.1" 200 58 "-" "curl/7.53.1" "my.ip.is.here"
What you expected to happen:
I should not be able to access it since I'm on a different IP.
How to reproduce it (as minimally and precisely as possible):
curl http://test.com
Anything else we need to know:
The text was updated successfully, but these errors were encountered: