From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Juan Carlos Lazcano <juan@placidnetworks.com>,
"netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Stateless NAT in nftables with maps for performance
Date: Mon, 15 Sep 2025 11:11:05 +0200 [thread overview]
Message-ID: <aMfYKTfEF7RsRvm8@calendula> (raw)
In-Reply-To: <aMQiIC9016sR9Djw@strlen.de>
On Fri, Sep 12, 2025 at 03:37:36PM +0200, Florian Westphal wrote:
> Juan Carlos Lazcano <juan@placidnetworks.com> wrote:
> > My echo/reply base icmp functionality for v4 is working atleast at a cursory glance, without further testing I'm not sure what other parts of icmp are not working with this approach.
>
> Internal addresses leak via icmp dst unreach, redirects etc. which contain copies of
> the (rewritten or original) addresses.
> That in turn breaks path mtu discovery for instance:
>
> Server may see internal address reflected in embedded header.
> Client can receive error for source address it doesn't have.
>
> NAT engine also rewrites embedded headers, see e.g. nf_nat_ipv4_fn()
> in net/netfilter/nf_nat_proto.c and nf_nat_icmp_reply_translation() to
> avoid this.
I think this can be fixed by extending userspace to mangle the icmp
payload, I would like to reach this at some point.
prev parent reply other threads:[~2025-09-15 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 11:28 Stateless NAT in nftables with maps for performance Juan Carlos Lazcano
2025-09-12 12:05 ` Florian Westphal
2025-09-12 12:23 ` Florian Westphal
2025-09-12 12:47 ` Juan Carlos Lazcano
2025-09-12 13:37 ` Florian Westphal
2025-09-15 9:11 ` Pablo Neira Ayuso [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=aMfYKTfEF7RsRvm8@calendula \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=juan@placidnetworks.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;
as well as URLs for NNTP newsgroup(s).