Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Glen Huang <heyhgl@gmail.com>
To: netfilter@vger.kernel.org
Subject: Why inet table doesn't support nat prerouting chain?
Date: Fri, 6 Mar 2020 19:32:49 +0800	[thread overview]
Message-ID: <DF324CE0-08D5-4041-9761-D7F740979715@gmail.com> (raw)

Hi,

It seems I can create a nat prerouting chain in either ip or ip6 table, but not inet, I wonder if that’s by design?

$ nft list ruleset
<empty output>
$ nft create table inet tbl
<empty output>
$ nft add chain inet tbl prerouting \{ type nat hook prerouting priority dstnat \; \}
Error: Could not process rule: No such file or directory
add chain inet tbl prerouting { type nat hook prerouting priority dstnat ; }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$ nft list ruleset
table inet tbl {
}

If I replace inet with ip or ip6 then the previous commands work.

I tried them in docker with manually compiled nft 0.9.3, and also in debian 10.3 which has nft 0.9.0 (it doesn’t recognize dstnat, but replacing it with 0 results in the same error).

Do I have to create such chains separately for ip and ip6 tables?

Regards

             reply	other threads:[~2020-03-06 11:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 11:32 Glen Huang [this message]
2020-03-06 11:37 ` Why inet table doesn't support nat prerouting chain? Florian Westphal
2020-03-06 11:40   ` Glen Huang

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=DF324CE0-08D5-4041-9761-D7F740979715@gmail.com \
    --to=heyhgl@gmail.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