Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pavel Mores <pvl@uh.cz>
To: netfilter@lists.samba.org
Subject: how to delete *some* netfilter rules?
Date: Fri, 14 Jun 2002 18:18:00 +0200	[thread overview]
Message-ID: <20020614161800.GA6137@kostra.uh.cz> (raw)


Hello,

the problem I'm facing now might well be already solved by someone else
so I thought I'd better ask.

My filter table is filled by several separate independent scripts, each
serving a distinct purpose.  Say that I use one script to generate
firewalling rules and another to enter a couple of packet accounting
rules needed by a monitoring subsystem.  Now, what if I want to flush
the firewalling rules *without* disturbing the traffic monitoring rules?

It certainly is possible to add to the firewall script a "delete_rules"
function that would basically mimic my "insert_rules" function, only
with -D instead of -A or -I.  But this tends to be ugly and avoiding the
need to edit 2 places for every single change is not easy in bash (can't
use perl there).

I thought about placing rules with different purpose into different user
chains, like, having a "FIREWALL-INPUT", "FIREWALL-FORWARD",
"TRAFFIC-MONITOR" etc. chains that would be called from the predefined
chains.  Resetting a subsystem would mean just flushing one or two
user-defined chains.  Well, this *is* simple but it assumes that rules
entered by different subsystems can't be traversed in arbitrary order -
which might turn out a severe limitation.

Basically, what I'm looking for is a way to mark rules with "owner" or
"user" id and then just say "delete any rule where the owner is
firewall".  Does anyone know a simple and robust way how to handle this?
Thanks in advance.

	pvl

P.S.  Please Cc: your replies to me since I'm not subscribed to this
list.



             reply	other threads:[~2002-06-14 16:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-14 16:18 Pavel Mores [this message]
2002-07-05 11:49 ` how to delete *some* netfilter rules? Jan Humme
2002-07-05 13:57   ` Martin Tomasek

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=20020614161800.GA6137@kostra.uh.cz \
    --to=pvl@uh.cz \
    --cc=netfilter@lists.samba.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