From: Florian Westphal <fw@strlen.de>
To: Rafael Ganascim <rganascim@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: First packet NAT flow
Date: Mon, 21 Dec 2020 02:15:20 +0100 [thread overview]
Message-ID: <20201221011520.GA9639@breakpoint.cc> (raw)
In-Reply-To: <CAD4ZOMyRWi-wahS4bw11h=hQpzgjaCjHiomcsKK5fjqawe92MQ@mail.gmail.com>
Rafael Ganascim <rganascim@gmail.com> wrote:
> As I understand it, when a connection is already established at
> conntrack, the packets use these entries to flow, do the translation,
> and don't go through the entire ruleset. Is this reading correct?
They skip the NAT table/nat chains, but not the rest of the ruleset.
> But what about the first connection packet that needs to be NATed?
> Suppose we have 1000 rules of SRC-NAT, are the first packets covered
> all of them until a match occurs?
Yes.
> Or is there a structure already
> "configured" where the IP can get its NAT IP quickly?
No.
> And for example, for 1:1 NAT, despite the number of rules, what's the
> difference between 256 rules of src-nat or just one using NETMAP
None.
next prev parent reply other threads:[~2020-12-21 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 12:14 First packet NAT flow Rafael Ganascim
2020-12-21 1:15 ` Florian Westphal [this message]
2020-12-21 11:52 ` Rafael Ganascim
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=20201221011520.GA9639@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter@vger.kernel.org \
--cc=rganascim@gmail.com \
/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