HAProxy set output interface and IP Address

  • I have used HAProxy for couple of months and my traffic was routed though one IP address. For some security reasons, I have to listen on an IP address and send the traffic to the servers with different IP Address. So in this case, what should I do to achieve this goal?
    EX: listen IP is : send traffic to backend servers :
    Also I have just an interface , Only LAN !!! (one hand method)

  • @shayandely
    First configure the pfSense box 2 IP's one on the nic-interface the other as a IP-alias.

    Then on the haproxy configuration pages configure the Frontend to listen on the desired IP.
    As for the backend server its possible to configure a textual option for the servers in a backend. There you could write the text "source" iirc that should make it so the TCP connections on the backend are made from that IP.

  • @piba
    Thank you so much. It works like a charm!!👍 👍 👍 👍