# Not getting source IP

**URL:** <https://community.traefik.io/t/not-getting-source-ip/8742>\
**Category:** Traefik v2\
**Tags:** kubernetes-crd\
**Created:** [November 25, 2020, 9:06pm UTC](https://community.traefik.io/t/not-getting-source-ip/8742 "2020-11-25T21:06:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsha](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vsha](https://community.traefik.io/u/vsha)\
**Post date:** [November 25, 2020, 9:06pm UTC](https://community.traefik.io/t/not-getting-source-ip/8742/1 "2020-11-25T21:06:30Z")

</div>

(installed in a EKS k8s cluster behind a classic Load Balancer (ELB))  
I am testing Traefik as a replacement for our Nginx-ingress and have done:

1. Installed via helm chart and overrode some defaults:  
`helm upgrade --debug --set="additionalArguments={--accesslog=true,--accesslog.fields.defaultmode=keep, --accesslog.fields.headers.defaultmode=keep,--log.level=DEBUG}" traefik traefik/traefik -n traefik`

Aded in the whoami service with an IngressRoute:

```auto

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: whoami
  namespace: traefik
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`whoami.YYY.com`)
      kind: Rule
      services:
        - name: whoami
          port: 80

```

However when I look at the output of whoami, I only see the IP of the AWS ELB:

```auto
Hostname: whoami
IP: 127.0.0.1
IP: 192.168.141.105
RemoteAddr: 192.168.137.83:36394
GET / HTTP/1.1
Host: whoami.YYY.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
X-Forwarded-For: 192.168.143.223
X-Forwarded-Host: whoami.YYY.com
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: traefik-6c7b99fdfd-w6km8
X-Real-Ip: 192.168.143.223

```

How do I get the real client/source IPs to show up in Traefik?

Thanks  
V

---

<div class="post-metadata">

**Author:** ![jspdown](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jspdown/32/2808_2.png) [@jspdown](https://community.traefik.io/u/jspdown)\
**Post date:** [November 26, 2020, 2:37pm UTC](https://community.traefik.io/t/not-getting-source-ip/8742/2 "2020-11-26T14:37:27Z")

</div>

Hello @vsha and thanks for your interest in Traefik.

The `X-Forwarded-For` header contains the source IP as well as IPs of the different proxies. For security reasons, Traefik doesn't trust this list by default. You can configure the [forwardedHeaders](https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers) options on your entrypoint to explicitly trust your ELB.

---

<div class="post-metadata">

**Author:** ![vsha](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vsha](https://community.traefik.io/u/vsha)\
**Post date:** [November 29, 2020, 2:34am UTC](https://community.traefik.io/t/not-getting-source-ip/8742/3 "2020-11-29T02:34:26Z")

</div>

Thanks for the reply @jspdown. I thought I had tried that by using

```auto
- --entrypoints.web.forwardedheaders.insecure=true
- --entrypoints.websecure.forwardedheaders.insecure=true

```

but that didn't seem to work either. Am I using the arguments incorrectly?  
Thanks  
Viren

---

<div class="post-metadata">

**Author:** ![vsha](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vsha](https://community.traefik.io/u/vsha)\
**Post date:** [November 29, 2020, 2:40am UTC](https://community.traefik.io/t/not-getting-source-ip/8742/4 "2020-11-29T02:40:34Z")

</div>

Went back and looked at my config and realized that I had incorrect indentation that caused the insecure header arguments not to be applied. Sorry about that and thanks for the help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [December 2, 2020, 2:40am UTC](https://community.traefik.io/t/not-getting-source-ip/8742/5 "2020-12-02T02:40:34Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
