Iis – Getting client IP address on IIS server behind HAProxy over HTTPS

haproxyhttpsiis

We are in the process of setting up two IIS servers that will be load balanced behind a server running HAProxy.

All traffic to these servers will be over HTTPS.

The problem that we are noticing is that all traffic is being logged on the IIS servers as coming from the HAProxy server IP. While this is technically correct, I'm trying to figure out how we can "see" the original client IP address on the IIS servers for logging purposes.

We have X-Forwarded-For setup on both the HAProxy and IIS (by installing F5′s X-Forwarded-For ISAPI filter), however this only appears to help with traffic over HTTP. HTTPS is still being logged as coming from the HAProxy server.

Thanks for any help!

Best Answer

That is a "normal" side-affect of proxies. You should have corresponding logs on the proxy that matches up.