Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Christoph Pleger" <Christoph.Pleger@cs.tu-dortmund.de>
To: netfilter@vger.kernel.org
Subject: Chain priorities for NAT
Date: Wed, 11 Jan 2017 17:25:27 +0100	[thread overview]
Message-ID: <7c7a3675f33b1e4768f751e6fd2864eb.squirrel@postweb.cs.tu-dortmund.de> (raw)

Hello,

I am just doing my first steps with the nftables program, reading the
documentation and entering some of the commands mentioned there. After
reading something about NAT rules, I am now quite confused about the
priorities that can be given when creating chains:

The Wiki on https://wiki.nftables.org mentions two priorities specifically
available for NAT, -100 and 100. But of these two, the wiki's example for
NAT only uses the value 100 for the postrouting chain. The prerouting
chain has priority 0, and there is no difference between SNAT and DNAT.

When I look at the ipv4-nat example which is shipped together with my
nftables package, both chains use priority -150, though due to the Wiki,
that value is used for mangling.

And when I look at some online-exmaples, they use 0 for prerouting and
postrouting.

So, what are really the best values to use for priority in snat prerouting
and postrouting and dnat prerouting and postrouting?

Kind regards
  Christoph


             reply	other threads:[~2017-01-11 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 16:25 Christoph Pleger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-02 12:52 Chain priorities for NAT Christoph Pleger
2017-02-06 17:48 ` 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=7c7a3675f33b1e4768f751e6fd2864eb.squirrel@postweb.cs.tu-dortmund.de \
    --to=christoph.pleger@cs.tu-dortmund.de \
    --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