When using NSX native load balancer, the requestor client IP addresses aren't seen in logging at destination web servers.
search cancel

When using NSX native load balancer, the requestor client IP addresses aren't seen in logging at destination web servers.

book

Article ID: 396165

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Packets that have been forwarded by the native load balancer do not include the IP address of origin clients as expected and instead show SNAT IP addresses. 

Environment

VMware NSX 4.x
VMware NSX-T Data Center 3.x

Cause

Web servers log each request they handle with the requesting client IP address. These logs are used for debugging and analytic purposes. If the deployment topology requires SNAT on the load balancer, then the server uses the client SNAT IP address which defeats the purpose of logging. 

Resolution

As a workaround, the load balancer can be configured to insert X-Forwarded-For (XFF) HTTP headers with the original client IP address. Servers can be configured to log the IP address in the XFF header instead of the source IP address of the connection.

Refer to Broadcom documentation for how to Add an Application Profile (NSX-T 3.x) / Add an Application Profile (NSX 4.x) for instructions on how to apply the X-Forwarded-For setting for an NSX native load balancer.