All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karol Babioch <karol@babioch.de>
To: netfilter@vger.kernel.org
Subject: nftables: Specify multiple protocols in one rule
Date: Thu, 3 Mar 2016 11:47:06 +0100	[thread overview]
Message-ID: <56D8162A.4030607@babioch.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 854 bytes --]

Hi,

I'm stuck with something, that seems very trivial, but won't work for
me. In particular I want to specify a rule to allow DNS traffic (both
UDP and TCP). In its most basic form my rules for that look something
like this:

    oif eth0 udp dport domain accept
    oif eth0 tcp dport domain accept

According to these examples [1], it should also be possible to put udp
and tcp into a set, e.g. something like that:

    oif eth0 {udp,tcp} dport domain accept

However, this does not work and results in an syntax error, complaining
about the "dport" statement. What am I missing here?

Is it possible to simply the above two rules into one? I have rules like
this all over the place, so it would be a huge win for me.

Thanks!

Best regards,
Karol Babioch

[1]: https://home.regit.org/2014/01/why-you-will-love-nftables/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

                 reply	other threads:[~2016-03-03 10:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=56D8162A.4030607@babioch.de \
    --to=karol@babioch.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.