Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Real IP in logs explorer for LB

Hi to all,

We are running a proxy (Cloudflare) in front of external LB. We want to view the real customer IP in "Logs explorer > Cloud HTTP load balancer" but it seems that you can't use headers (like x-forwarded-for or true-client.ip) in logs explorer. It only contains semantics defined by the HTTP spec and you should use another tool to extract the information from these headers. 

Can anyone confirm that there's no way to get the real ip (not the one from the cloudflare servers) as the remoteIP field in Logs explorer?

Thanks in advance and best regards.

Solved Solved
0 3 2,416
1 ACCEPTED SOLUTION

No, there is no way to get the IP address from a client that is behind a proxy server, that is the whole point of that server as the connections are handled by it in the client's name. If you want to know the client's IP address, you can get it from the proxy itself, or make it send the logs to Cloud Logging by using any of the Logging Libraries.

View solution in original post

3 REPLIES 3

No, there is no way to get the IP address from a client that is behind a proxy server, that is the whole point of that server as the connections are handled by it in the client's name. If you want to know the client's IP address, you can get it from the proxy itself, or make it send the logs to Cloud Logging by using any of the Logging Libraries.

Thanks for the answer!

Using the proxy service in the same case, will Armor misjudge the actual IP address of the customer?