Real IP address of client

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

https://www.keycloak.org/docs/latest/server_installation/#identifying-client-ip-addresses

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

location /auth {
proxy_pass 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

Thank you so much, managed to get this resolved.

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.

2 Likes

Signed in devices

  • Windows 10 / Edge/143.0.0Current session

    IP address

    172.18.0.1

  • 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

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