# Chaining HAProxies and the proxy protocol

**URL:** <https://discourse.haproxy.org/t/chaining-haproxies-and-the-proxy-protocol/4508>\
**Category:** Help!\
**Created:** [November 14, 2019, 9:26pm UTC](https://discourse.haproxy.org/t/chaining-haproxies-and-the-proxy-protocol/4508 "2019-11-14T21:26:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GerMalaz](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@GerMalaz](https://discourse.haproxy.org/u/GerMalaz)\
**Post date:** [November 14, 2019, 9:26pm UTC](https://discourse.haproxy.org/t/chaining-haproxies-and-the-proxy-protocol/4508/1 "2019-11-14T21:26:16Z")

</div>

I need to (temporarily) chain HAProxies (HAP A has connection issues with some backends)

HAP A → HAP B → backends

in HAP B, this works:

> Blockquote  
> bind \*:8080 accept-proxy

```
    acl lb src <ip>
    acl lb src <ip>
     tcp-request connection accept if lb

```

# tcp-request connection expect-proxy layer4 if lb

```
    tcp-request connection reject

```

Blockquote

But the expect-proxy line (without the accept line), does not work with or without accept-proxy in the bind line.

Reading the docs, I expected the combination expect-proxy without accept-proxy to work. Is there a correct way?

Thanks,  
Gerardo
