HAProxy Enterprise Documentation 2.1r1

Bind outgoing connections

To bind outgoing connections to a specific socket address, use the source directive in the global section.

IPv4 examples

global
  source 126.123.10.12:12345

The port is optional. It defaults to 0 for random ports.

global
  source 126.123.10.12

IPv6 examples

global
  source 2607:f8b0:400e:c00::ef:12345

If the address is enclosed by [ square brackets ], the port is optional.

global
  source [2607:f8b0:400e:c00::ef]
global
  source [2607:f8b0:400e:c00::ef]:12345

Next up

Encrypt traffic
HAProxyConf Registration