HAProxy proxyingto wrong IP

Having the weirdest issue with HAProxy… this is an example front/backend I have:

# telnet
frontend fe-telnet
  bind :::23
  bind :23
  default_backend be-telnet

backend be-telnet
  stick-table type ip size 20k expire 30m
  stick on src
  server sbbs 10.16.16.2:230 send-proxy-v2

Yet in the logs I can see:

haproxy  | Connect from 77.90.185.18:41992 to 10.0.0.191:587 (fe-smtp-submit/TCP)

It should be forwarding to 10.16.16.2, but it forwards to 10.0.0.191. I am running haproxy in docker with host network mode. Can someone help me troubleshoot this? 10.16.16.2 is pingable from the host.

Just tested, no matter what IP I put, it always forwards to 10.0.0.191. Doesn’t matter what IP is on the server line.

You are misinterpreting what this log means. This is just the destination IP address of the frontend socket. It has nothing to do with the destination IP haproxy connects to.

I suggest you switch to option tcplog. You can find more information about logging in the manual:

http://docs.haproxy.org/2.6/configuration.html#8