Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Radek Kanovsky <rk@dat.cz>
To: Pieter Smit <mlist2010@vigor.co.za>
Cc: netfilter@vger.kernel.org
Subject: Re: iptables rules in comparable form
Date: Wed, 2 Jun 2010 08:17:59 +0200	[thread overview]
Message-ID: <20100602061759.GA23633@q.uh.cz> (raw)
In-Reply-To: <AANLkTinkkj9uoIobFJzyJvCk7BN91MVM8T0mohR1vh8b@mail.gmail.com>

On Tue, Jun 01, 2010 at 10:29:10PM +0200, Pieter Smit wrote:

> Radek, your problem is getting the rules into a standard format, where
> you can match them to existing rules.
> 
> Would a solution/workaround not be to
> 1. create a dummy test chain/table not being used.
> 2. add new rules to the chain/table  (have to modify them slightly) 1 by 1
> 3. retrieve them in a standard form as provided by iptables-save -t test
> 4. spend time in python routine to match and decide what to remove/update.
> 5. make single insertion/replacement if needed.
> 6. clear test table and start with next rule.

Its not viable because I need also minimize the number of iptables operations.

Another solution could be to dynamicaly load iptables extensions
modules into my script and use somehow their parameter processing
code if possible.

Regards

Radek Kanovsky

  reply	other threads:[~2010-06-02  6:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01  8:10 iptables rules in comparable form Radek Kanovsky
2010-06-01  8:50 ` Jan Engelhardt
2010-06-01  9:18   ` Mart Frauenlob
2010-06-01 11:25     ` Radek Kanovsky
2010-06-01 11:56       ` Jan Engelhardt
2010-06-01 16:03         ` Radek Kanovsky
2010-06-01 18:19           ` Jan Engelhardt
2010-06-01 18:35             ` Radek Kanovsky
2010-06-01 18:01         ` Radek Kanovsky
2010-06-01 18:26           ` Jan Engelhardt
2010-06-01 19:36             ` Radek Kanovsky
2010-06-01 20:29               ` Pieter Smit
2010-06-02  6:17                 ` Radek Kanovsky [this message]
2010-06-01 13:27       ` Mart Frauenlob
2010-06-01 16:47         ` Radek Kanovsky

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=20100602061759.GA23633@q.uh.cz \
    --to=rk@dat.cz \
    --cc=mlist2010@vigor.co.za \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox