traefik: address of client using X-Real-IP nor X-Forwarded-For from traefik to backend seems not working
Welcome!
- Yes, I’ve searched similar issues on GitHub and didn’t find any.
- Yes, I’ve searched similar issues on the Traefik community forum and didn’t find any.
What did you do?
have a look at https://whatismyip.am.nl.eu.clandestine.network/
Traefik should be sending (any of) the X-Forward-For IPs in the list (they’re all the same, they’re all correct)
for example: “HTTP_X_FORWARDED_FOR”: “102.165.25.122, 102.165.25.122, 102.165.25.122, 102.165.25.122, 102.165.25.122”,
and REMOTE_ADDR should be 102.165.25.122 but instead it’s
"REMOTE_ADDR": "100.64.70.2",
For applications not behind traefik, but are their own backend adjacent to traefik, they are working correctly:
102.165.25.122 - pgadmin [25/Jul/2021:05:12:05 +0000] “GET /favicon.ico?ver=50500 HTTP/1.1” 302 265 “https://pgadmin.ns1012.eu.clandestine.network/login?next=%2F” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36”
given the following configuration the traefik documentation indicates that this should be working correctly
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=100.64.68.3:80"
- "--entrypoints.web.forwardedHeaders.insecure=true"
- "--entrypoints.web.ProxyProtocol.insecure=true"
- "--metrics"
- "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
- "--log.level=DEBUG"
So one thing can be sure
- This is is not an issue with docker, if you don’t have an answer which fixes this by demonstrating a WORKING configuration, please leave the problem for somebody else to figure out. Changing docker won’t solve anything.
- This is a tired subject, one of which needs to be addressed given the large number of longstanding reports that it is NOT working correctly.
What did you see instead?
not working
What version of Traefik are you using?
v2.4
What is your environment & configuration?
previously described
If applicable, please paste the log output in DEBUG level
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (4 by maintainers)
Hello @github-sys-admin
You are making valid points and the technical content of your posts are insightful. I sense a lot of frustration in your writing – which I can understand when one has spent way more time on a issue that he should expect.
But you are expressing this frustration in an agressive way that might impact the well being of contributors that make this software and can act on your request. Open source leaders and contributors burnout is a real thing, and I invite you to consider the other humans writing the piece of software you use.
https://www.techrepublic.com/article/how-open-source-selfishness-can-lead-to-burnout/
Second warning, I highly recommend you change your tone if you hope to get an answer.
You are required to follow the Code of Conduct.
@github-sys-admin I would like to caution you about the tone of your replies, and remind you that you are required to follow the Code of Conduct.