-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Unable to get client IP when running on overlay network #614
Comments
May be related to: this is what i get on my kubernetes cluster via emilevauge/whoami image: Hostname: whoami-1929362576-lm19i 10.244.63.10 is the pod IP No information about the client IP :( |
I am experiencing the same behaviour when working with Kubernetes and Træfɪk locally through Minikube. |
I had some hopes that the Kubernetes v1.4 would solve this; ref http://kubernetes.io/docs/user-guide/load-balancer/#loss-of-client-source-ip-for-external-traffic. But so far I have not had any success. |
I now run kubernetes 1.4.0 and nothing changed :( |
Ping @vdemeester, any idea on this? |
Just ran in to this today while slowly moving away from our old load balancing infra. |
@rio are you using Træfik at all in your setup? |
Yes, we plan use it as our main ingress point. We've been already using it for services like grafana, staytus and other services that are not dependent on source ip. |
I still need this new feature, because I run a startup that provides TCP connection only for Minecraft players, there's no IP forwarding via HTTP header. Getting users IP via network layer is always better. |
i think this should be possible now using i however was unable to access traefik when publish is set to mode=host... |
any update for this? |
Noticed the same problem, spent several weeks figuring out this problem!! |
This is present on non-kubernets deployments. |
I am wondering why this is not getting more interest. Any swarm cluster is (IMHO) not usable with traefik.. Did anybody manage to work around this issue? Currently I am split between using host mode and having the ip but loosing the ingress network or having no option to limit access by source address / exposing the client ip to my apps (e.g. adguard would be much more useful with client IP) |
I am trying to figure this out as well. I have downstream DNS services and they all receive the IP of the traefik instance, while I need the IP of the client |
Maybe this solution will help in some way |
This may be an issue with Docker overlay networks and not Traefik specifically.
When running traefik as a docker 1.12 service and exposing a port, it connects to both the specified network from the service file and the built-in ingress network. When the upstream service receives requests forwarded from Traefik, the X-Forwarded-For header contains an IP address from the overlay network, not the actual client address.
The text was updated successfully, but these errors were encountered: