Re: Dangerous examples in nftables documentation

Dmitry Konishchev <[email protected]> Tue, 6 Jan 2026 21:36:05 +0300
Newsgroups gmane.comp.security.firewalls.netfilter.general
Message-ID <CABYZ2k40WHg2Thzo0=4r6Y6UTAtrw3EMRq=0fwKVViL40exAMA@mail.gmail.com>
> Note that match:
>
>     tcp flags syn
>
> Is the same as:
>
>     tcp flags & syn == syn

Oh... =) It's quite unexpected after `tcp flags != syn` which turns
out to be a simple comparison, as well as `ip daddr 1.2.3.4` is a
simple comparison... Thanks! That's what I am talking about: the
current documentation is so sparse, lacks details and having no
ability to test rules (it's hard to reproduce exact packets and test
your rules against them) that you have no options other than wondering
and learning from examples which are, as we found out "are just, ehm,
examples". :)

> The official documentation is as it is, but it is not TCP tutorial nor
> firewall building tutorial. In most cases it is just demonstration
> of nftables syntax. The valid TCP flags combinations are docemented
> in kernel sources, it will be redundant to repeat it in nftables (except
> point to right source file, as it is hard to find).

OK, thanks for the explanation! I got your point.