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

Transfer Client IP Address (Dedicated Load Balancers)

Transferring Client IP Address at Layer 4

Transfer Client IP Address is enabled by default for TCP and UDP listeners of dedicated load balancers. Load balancers communicate with backend servers using the real IP addresses of clients.

If the frontend protocol is TLS, you can use ProxyProtocol to transfer client IP addresses.

In some special cases, Transfer Client IP Address does not work. You can transfer client IP addresses by referring to Table 1.

Table 1 Transferring client IP addresses

Listener Protocol

Transferring Client IP Addresses in Special Cases

TCP

You can configure the TOA plug-in or use ProxyProtocol to transfer the client IP addresses because Transfer Client IP Address does not work in the following scenarios:

  • TCP listeners communicate with IP as backend servers.
  • IPv4/IPv6 translation is enabled for TCP listeners. In this case, client IP addresses are translated.

UDP

Client IP addresses cannot be obtained in the following scenarios:

  • Load balancers communicate with IP as backend servers.
  • IPv4/IPv6 translation is enabled for UDP listeners.

TLS

Using ProxyProtocol to Transfer Client IP Addresses

Transferring Client IP Address at Layer 7

Transfer Client IP Address is enabled by default for HTTP, HTTPS, and QUIC listeners of dedicated 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.