# Problems getting users real ip to pod

**URL:** https://discuss.kubernetes.io/t/problems-getting-users-real-ip-to-pod/3210
**Category:** General Discussions
**Created:** [October 23, 2018, 8:23am UTC](https://discuss.kubernetes.io/t/problems-getting-users-real-ip-to-pod/3210 "2018-10-23T08:23:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jonasdkhansen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jonasdkhansen/32/295_2.png) [@jonasdkhansen](https://discuss.kubernetes.io/u/jonasdkhansen)
#### Post date: [October 23, 2018, 8:23am UTC](https://discuss.kubernetes.io/t/problems-getting-users-real-ip-to-pod/3210/1 "2018-10-23T08:23:47Z")

</div>

Hi all! I have a GKE cluster with Istio installed. I’m using the istio ingress as loadbalancer from outside, and sending the traffic to a simple nginx pod. But the nginx is getting the istio ingress ip, and not the real users ip.

This is the nginx configuration:  
proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;

Anybody know what the problem could be ?

---

<div class="post-metadata">

### Author: ![jonasdkhansen](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jonasdkhansen/32/295_2.png) [@jonasdkhansen](https://discuss.kubernetes.io/u/jonasdkhansen)
#### Post date: [October 23, 2018, 11:04am UTC](https://discuss.kubernetes.io/t/problems-getting-users-real-ip-to-pod/3210/2 "2018-10-23T11:04:09Z")

</div>

I got it working with adding externalTrafficPolicy: Local to the istio-ingressgateway service, and then in my nginx conf i added a header with $http\_x\_forwarded\_for
