# Real IP address of client

**URL:** <https://forum.keycloak.org/t/real-ip-address-of-client/8399>\
**Category:** Configuring the server\
**Created:** [April 9, 2021, 4:44am UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399 "2021-04-09T04:44:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skmishra](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Skmishra](https://forum.keycloak.org/u/Skmishra)\
**Post date:** [April 9, 2021, 4:44am UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/1 "2021-04-09T04:44:44Z")

</div>

Dear All,  
I was looking to have client Real IP address in Event Log , As of now i see its showing IP Address 127.0.0.1.  
I am using NGINX as web server.

any help please ??

Thanks

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [April 9, 2021, 6:07am UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/2 "2021-04-09T06:07:42Z")

</div>

[https://www.keycloak.org/docs/latest/server\_installation/#identifying-client-ip-addresses](https://www.keycloak.org/docs/latest/server_installation/#identifying-client-ip-addresses)

---

<div class="post-metadata">

**Author:** ![Skmishra](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Skmishra](https://forum.keycloak.org/u/Skmishra)\
**Post date:** [April 9, 2021, 7:16am UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/3 "2021-04-09T07:16:36Z")

</div>

Thank you so much, i am unable to achive this. my NGINX configuration is as below:

location /auth {  
proxy\_pass [http://localhost:8080](http://localhost:8080);  
}  
add\_header X-XSS-Protection: “1; mode=block”;  
add\_header Strict-Transport-Security “max-age=31536000; includeSubDomains” always;  
#add\_header Strict-Transport-Security “max-age=31536000; includeSubdomains; preload”;  
add\_header Content-Security-Policy “default-src ‘self’; frame-ancestors ‘self’; script-src ‘self’ ‘unsafe-inline’; style-src ‘self’ ‘unsafe-inline’;”;  
proxy\_set\_header X-Forwarded-For $proxy\_protocol\_addr; # To forward the original client’s IP address  
proxy\_set\_header X-Forwarded-Proto $scheme; # to forward the original protocol (HTTP or HTTPS)  
proxy\_set\_header Host $host; # to forward the original host requested by the client  
add\_header X-Frame-Options “SAMEORIGIN”;

Any clue please

---

<div class="post-metadata">

**Author:** ![Skmishra](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Skmishra](https://forum.keycloak.org/u/Skmishra)\
**Post date:** [April 9, 2021, 3:41pm UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/4 "2021-04-09T15:41:22Z")

</div>

Thank you so much, managed to get this resolved.

---

<div class="post-metadata">

**Author:** ![the-night-wing](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/the-night-wing/32/7674_2.png) [@the-night-wing](https://forum.keycloak.org/u/the-night-wing)\
**Post date:** [February 13, 2023, 1:45pm UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/5 "2023-02-13T13:45:20Z")

</div>

I just love how people ask questions and then reply to themselves “solved/resolved”. Would be really nice if you explained how did you manage to get it resolved.

---

<div class="post-metadata">

**Author:** ![bscloud-net](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/bscloud-net/32/12340_2.png) [@bscloud-net](https://forum.keycloak.org/u/bscloud-net)\
**Post date:** [December 18, 2025, 4:27pm UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/6 "2025-12-18T16:27:01Z")

</div>

## Signed in devices

- Windows 10 / Edge/143.0.0Current session

- Can someone help me? Running with a Docker and configured with reverse proxy using ngnux for access. There is an IP address in the logged in device. The displayed address is 172.18.0.1, which is not the user’s real address

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [December 18, 2025, 4:28pm UTC](https://forum.keycloak.org/t/real-ip-address-of-client/8399/7 "2025-12-18T16:28:47Z")

</div>

Most probably your reverse proxy is not properly configured.  
Make sure to forward the required headers and configure Keycloak read the headers.

> **[Configure the reverse proxy headers - Configuring a reverse proxy](https://www.keycloak.org/server/reverseproxy#_configure_the_reverse_proxy_headers)**
>
> Keycloak will parse the reverse proxy headers based on the proxy-headers option which accepts several values: | Configure Keycloak with a reverse proxy, API gateway, or load balancer.
