# Haproxy Forwoard Original IP ADDRESS

**URL:** <https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671>\
**Category:** Help!\
**Created:** [March 28, 2024, 8:27am UTC](https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671 "2024-03-28T08:27:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![garutialle](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@garutialle](https://discourse.haproxy.org/u/garutialle)\
**Post date:** [March 28, 2024, 8:27am UTC](https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671/1 "2024-03-28T08:27:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![garutialle](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@garutialle](https://discourse.haproxy.org/u/garutialle)\
**Post date:** [March 28, 2024, 10:12am UTC](https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671/2 "2024-03-28T10:12:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![garutialle](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@garutialle](https://discourse.haproxy.org/u/garutialle)\
**Post date:** [March 29, 2024, 9:34am UTC](https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671/3 "2024-03-29T09:34:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tuxillo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/tuxillo/32/2326_2.png) [@tuxillo](https://discourse.haproxy.org/u/tuxillo)\
**Post date:** [September 17, 2024, 9:18pm UTC](https://discourse.haproxy.org/t/haproxy-forwoard-original-ip-address/9671/4 "2024-09-17T21:18:56Z")

</div>

Did you find a way eventually? Thanks.
