From: Florian Westphal <fw@strlen.de>
To: Stefan Hartmann <stefanh@hafenthal.de>
Cc: "netfilter.org" <netfilter@vger.kernel.org>
Subject: Re: nftables 0.9.3, sets with concatentation
Date: Fri, 20 Mar 2020 17:37:58 +0100 [thread overview]
Message-ID: <20200320163758.GB3305@breakpoint.cc> (raw)
In-Reply-To: <10a01f25-84fa-fa19-c10f-7c530ef9f10c@hafenthal.de>
Stefan Hartmann <stefanh@hafenthal.de> wrote:
> I have successfully migrated from a cisco IOS router to a new GNU/Linux
> Debian box with nftables 0.9.3.
>
> At now I am trying to simplify the configuration with sets.
> E.g.
> table ip FILTER4 {
> set s4_ICMP-RELATED {
> type icmp_type
> elements = { destination-unreachable,
> time-exceeded }
>
> and using this set
> ...
> chain ACL4-IN_IF2 {
> ct state invalid log prefix "NFT: FILTER4/ACL4-IN_IF2: ct invalid: " drop
> ct state established,related accept
> icmp type @s4_ICMP-RELATED accept
> ...
>
> This works perfectly with sets without concatenation.
>
>
> For the sake of a well-arranged ruleset,
> it would be nice to have a concatenated set like
> set s4_MISC-SERVICES {
> type inet_proto . inet_service
> elements = { udp . 69, tcp . 23 ]
>
> and then use this set like
> ip daddr $IP4_IF2 . dport @s4_MISC-SERVICES accept
try
... IF2 . th dport ..
(th == transport header).
next prev parent reply other threads:[~2020-03-20 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 15:51 nftables 0.9.3, sets with concatentation Stefan Hartmann
2020-03-20 16:37 ` Florian Westphal [this message]
2020-03-20 16:41 ` Frank Myhr
2020-03-20 16:46 ` Frank Myhr
2020-03-21 10:17 ` Stefan Hartmann
2020-03-21 14:24 ` Frank Myhr
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=20200320163758.GB3305@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter@vger.kernel.org \
--cc=stefanh@hafenthal.de \
/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