Haproxy Forwoard Original IP ADDRESS

Hi everyone, I’m trying to implement haproxy in my infrastructure - but I have a problem even if I use option forwardfor I don’t see the IP address of the client that made the request appear but only that of haproxy. I also configured haproxy with the log-forward option which collects the network logs and sends them to the syslog server. But even there the logs are written with the IP address of the haproxy and not of the client that generated the log.

My Conf

global

    log ring@logbuffer local5
    daemon
    maxconn 256

defaults
    log global
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

log-forward syslog

Accepts incoming TCP messages

bind 192.168.16.46:1514

Accepts incoming UDP messages

dgram-bind 192.168.16.46:1514

Sends outgoing messages via UDP

log ring@logbuffer local0

ring logbuffer
description “buffer for logs”
format rfc5424
maxlen 1500
size 65536
timeout connect 10s
timeout server 20s

Sends outgoing messages via TCP

root@haproxy:/ # cat /usr/local/etc/haproxy.conf
global

    log ring@logbuffer local5
    daemon
    maxconn 256

defaults
    log global
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

log-forward syslog

Accepts incoming TCP messages

bind 192.168.16.46:1514

Accepts incoming UDP messages

dgram-bind 192.168.16.46:1514

Sends outgoing messages via UDP

log ring@logbuffer local0

ring logbuffer
description “buffer for logs”
format rfc5424
maxlen 1500
size 65536
timeout connect 10s
timeout server 20s

Sends outgoing messages via TCP

server logserver 192.168.10.21:1514 check send-proxy

    frontend fe_rsync
            bind 192.168.16.46:873
            mode tcp
            use_backend be_rsync

    backend be_rsync
            mode tcp
            option forwardfor
            server rsyncd 192.168.10.9:873  send-proxy-v2


    resolvers mynameservers
            nameserver ns1 192.168.10.5:53

Thanks

I solved it with rsyncd by activating proxy protocol = true in rsyncd.conf and inserting send-proxy in the backend. I still have to solve syslog-ng I tried with the transport tcp-proxies option but I can’t log in with the original IP address

Thank

I have carried out various tests but the log comes to me with both HOST and HOST_FROM with the IP address of the HAPROXY, I don’t get the source IP address

Did you find a way eventually? Thanks.