netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nftables and iptables nat coexistence
Date: Thu, 19 Oct 2017 12:15:29 +0200	[thread overview]
Message-ID: <20171019101529.GA2224@salvia> (raw)
In-Reply-To: <20171018135650.GA16796@breakpoint.cc>

Hi Florian,

On Wed, Oct 18, 2017 at 03:56:50PM +0200, Florian Westphal wrote:
> Hi.
> 
> Couple of month ago I sent 2 RFC patches to allow using nftables and
> iptables NAT at same time.

Hm, I think we forgot to talk about this during the NFWS.

> If this is unwanted (there was concern wrt. to the new hooks I had to
> add for this), we should at least improve/restrict iptables and nftables
> to
> 
> 1. not allow load if iptable_nat when nft nat hook is active.

I guess this would apply the other way around.

> 2. make it a requirement to register empty nat hook (required for
> the reply direction).

I'm seeing many posts on the lack of automatic registration of the
empty NAT chain. This is a pitfall where many people are falling one
after another in migrations.  I know there's a bold sentence in the
documentation, but I think it's a sympton that we're doing something
that is unintuitive to users, and it should be a wake up call for us.
Can we just autoregister the empty nat chain using the default
priority? If an explicit chain is registered, then disable this.

Does this sound too complicated to you?

> 3. Do not permit more than one nat type per family/hook.

Yes, this makes sense to me.

> 4. we should probably also add more checks on nat priority
> for nftables to reject hooks that can't work due to no-conntrack
> information being available at that point.

Yes, this would be good too.

> I think not allowing nft and iptablles nat at the same time is fine
> as mixing has problems on its own, especially which transformation
> gets precedence, so I suspect the old RFC patches resolve one issue
> and add another one :)

My only concern is, may this cause problems when migrating from
iptables to nftables?

  reply	other threads:[~2017-10-19 10:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 13:56 nftables and iptables nat coexistence Florian Westphal
2017-10-19 10:15 ` Pablo Neira Ayuso [this message]
2017-10-19 10:25   ` Pablo Neira Ayuso
2017-10-19 11:18   ` Florian Westphal
2017-10-19 11:30     ` Pablo Neira Ayuso

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=20171019101529.GA2224@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@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).