Help Center/ Elastic Load Balance/ Drawer/ Adding a Listener/ Transfer Client IP Address (Shared Load Balancers)
Updated on 2025-07-25 GMT+08:00

Transfer Client IP Address (Shared Load Balancers)

Generally, shared load balancers use IP addresses in 100.125.0.0/16 to communicate with backend servers.

You can enable Transfer Client IP Address to obtain the clients IP addresses.

Transferring Client IP Address at Layer 4

You can enable or disable Transfer Client IP Address for TCP and UDP listeners of shared load balancers.

  • If Transfer Client IP Address is enabled, the shared load balancer communicates with backend servers using the real IP addresses of clients.
  • If Transfer Client IP Address is disabled, the shared load balancer communicates with backend servers using IP addresses in 100.125.0.0/16.

Transferring Client IP Address at Layer 7

Transfer Client IP Address is enabled by default for HTTP and HTTPS listeners of shared load balancers, which means that client IP addresses can be placed in the X-Forwarded-For header and transferred to the backend servers.

You can configure the backend servers to ensure that they can correctly parse the X-Forwarded-For header to obtain client IP addresses.

The X-Forwarded-For header is in the following format:

X-Forwarded-For: <client-IP-address>, <proxy-server-1-IP-address>, <proxy-server-2-IP-address>, ...

The first IP address included in the X-Forwarded-For header is the client IP address.