From: Dan Winship <danwinship@redhat.com>
To: Phil Sutter <phil@nwl.cc>, Eric Garver <eric@garver.life>,
Jan Engelhardt <jengelh@inai.de>,
netfilter-devel@vger.kernel.org, fw@strlen.de,
pablo@netfilter.org, Kevin Fenzi <kevin@scrye.com>,
Matthias Gerstner <matthias.gerstner@suse.com>,
arturo@debian.org
Subject: Re: [PATCH] tools: add a systemd unit for static rulesets
Date: Mon, 24 Mar 2025 21:34:26 -0400 [thread overview]
Message-ID: <831bd90a-4305-489c-9163-827ad0b04e98@redhat.com> (raw)
In-Reply-To: <Z9wgoHjQhARxPtqm@orbyte.nwl.cc>
On 3/20/25 10:05, Phil Sutter wrote:
> IMO we should at least include the builtin 'flush ruleset'
Boooo!
In kubernetes, kube-proxy's iptables mode polls the iptables rules once
every 30 seconds to make sure that the admin didn't do "systemctl
restart iptables" or "firewall-cmd --restart" and COMPLETELY BREAK
KUBERNETES[1]. The kube-proxy nftables mode *doesn't* currently do this,
because it assumes nobody would be so rude as to flush the entire nft
ruleset rather than only deleting and recreating their own table...[2]
(If the nftables "owner" flag thwarts "flush ruleset", then that's
definitely *better*, though that flag is still too new to help very much.)
Once upon a time, it was reasonable for the system firewall scripts to
assume that they were the only users of netfilter on the system, but
that is not the world we live in any more. Sure, *most* Linux users
aren't running Kubernetes, but many people run hypervisors, or
docker/podman, or other things that create a handful of dynamic
iptables/nftables rules, and then expect those rules to not suddenly
disappear for no apparent reason later.
If you're going to have a static nftables ruleset thing, please restrict
it to a single table, and never ever ever do "flush ruleset".
-- Dan
[1]
https://github.com/kubernetes/kubernetes/blob/v1.31.7/pkg/util/iptables/iptables.go#L80-L90
[2]
https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/3866-nftables-proxy/README.md?plain=1#L1274-L1296
next prev parent reply other threads:[~2025-03-25 1:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 20:59 [PATCH] tools: add a systemd unit for static rulesets Jan Engelhardt
2025-03-05 21:35 ` Pablo Neira Ayuso
2025-03-21 13:29 ` Arturo Borrero Gonzalez
2025-03-22 1:49 ` Duncan Roe
2025-03-22 9:24 ` Jan Engelhardt
2025-03-23 10:00 ` Arturo Borrero Gonzalez
2025-03-23 13:34 ` Jan Engelhardt
2025-03-23 21:04 ` Phil Sutter
2025-03-23 10:24 ` Pablo Neira Ayuso
2025-03-06 14:16 ` Eric Garver
2025-03-20 14:05 ` Phil Sutter
2025-03-22 9:46 ` Jan Engelhardt
2025-03-25 1:34 ` Dan Winship [this message]
2025-03-26 15:56 ` Phil Sutter
2025-03-26 22:21 ` Jan Engelhardt
2025-04-17 12:39 ` Pablo Neira Ayuso
2025-03-27 11:12 ` Dan Winship
2025-03-27 13:29 ` Phil Sutter
2025-03-22 9:41 ` Jan Engelhardt
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=831bd90a-4305-489c-9163-827ad0b04e98@redhat.com \
--to=danwinship@redhat.com \
--cc=arturo@debian.org \
--cc=eric@garver.life \
--cc=fw@strlen.de \
--cc=jengelh@inai.de \
--cc=kevin@scrye.com \
--cc=matthias.gerstner@suse.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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;
as well as URLs for NNTP newsgroup(s).