Get the client Ip behind a loadbalancer
3 Replies
The X-Forwarded-For (XFF) HTTP header field is a setting to configure through the web server. The web server is the service that serves your site from the backend node. The most common are Apache and NGINX.
I did a quick Google search and found these pieces of documentation that should help:
Apache:
Apache Module mod_remoteip
Apache and X-Forwarded-For Header (XFF)
NGINX:
Using the Forwarded header
NGINX and X-Forwarded-For Header (XFF)
Hi @watrick
i don't really understand how i will configure nginx for API services to get the client Ip, is there anything i need to do on the load balancer dashboard,
i tried to read the x-forward-for , it is returning a weird Ip address that is based in UK (where my cluster is located) but i'm sending request (as a client) from another country far away from UK
please help
useless support
found answer here after hours of headache
https://www.linode.com/community/questions/20620/how-can-i-use-proxy-protocol-with-linode-kubernetes-engine