-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Security: Kong allows remote clients to forge remote IP #1661
Labels
task/feature
Requests for new features in Kong
Comments
Note: somehow related to #1615 (asking for a better configurable behavior of the ngx_http_realip module. |
@thibaultcha I submitted a PR ^ |
Moved to #2202. Thanks! |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
We use a Layer 3 load balancer (relayD) to route requests to Kong. Currently with the way kong is setup, the default nginx LUA template includes the following entry:
set_real_ip_from 0.0.0.0/0;
Per the NGINX Documentation: http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
It would probably be more ideal if we could supply range(s) of trusted internal IPs instead in the kong configuration, which would be inserted into the LUA config automatically.
Here is a full example:
Command:
kyle$ curl -H "X-Real-IP: 222.222.222.222" -H "X-Forwarded-For: 222.222.222.222" -X GET https://api.kong.qa/kyle
Log Entry on Kong Server:
222.222.222.222 - - [20/Sep/2016:12:34:04 -0700] "GET /kyle HTTP/1.1" 404 249 "-" "curl/7.43.0"
Steps To Reproduce
Additional Details & Logs
The text was updated successfully, but these errors were encountered: