Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: InterNetX - Marc Reymann <marc.reymann@internetx.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Haproxy's "send-proxy-v2" doesn’t work when conntrack is disabled
Date: Tue, 14 Sep 2021 16:30:23 +0200	[thread overview]
Message-ID: <20210914143023.GC25110@breakpoint.cc> (raw)
In-Reply-To: <e15f6ae7-2a80-3dc2-2092-b59312a6e2cb@internetx.com>

InterNetX - Marc Reymann <marc.reymann@internetx.com> wrote:
> Haproxy and our Proxy app are running on the same server. Haproxy sends
> requests to the Proxy app via the proxy prototcol:
> 
> listen web_proxy_app
>         bind *:443 ssl crt /etc/ssl/our-certs no-sslv3
>         server proxy-app /tmp/proxy.sock send-proxy-v2
> 
> As soon as we exclude port 443 from the conntrack table via nft like this:
> 
> chain PREROUTING_NOTRACK {
>         type filter hook prerouting priority -300 policy accept
>         iif VLAN1012 tcp dport { 80, 443 } notrack
> 
> the proxy app doesn’t receive the correct IP values:
> 
> -   Proxy          2 123.123.129.3 57893 234.236.46.5 443   <--- before,
> good
> -   Proxy          2 123.123.129.3 58217 123.123.129.3  58217  <--- after,
> bad
> 
> Somehow the destination IP and port information gets lost.

<wild guess> "app" uses getsockopt SO_ORIGINAL_DST to fetch the
destination address and has no error handling for this.

Really, no idea.  How does the application obtain those addresses?

      reply	other threads:[~2021-09-14 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 13:40 Haproxy's "send-proxy-v2" doesn’t work when conntrack is disabled InterNetX - Marc Reymann
2021-09-14 14:30 ` Florian Westphal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914143023.GC25110@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=marc.reymann@internetx.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox