From: Craig Steadman <spinout@yakbox.shacknet.nu>
To: Jonathan <jonathan@jonathan.abda.net>
Cc: netfilter@lists.netfilter.org
Subject: Re: ways to lookup or query rules?
Date: Wed, 06 Oct 2004 15:41:19 +0800 [thread overview]
Message-ID: <1097048478.10818.89.camel@e500> (raw)
In-Reply-To: <002201c4ab53$f4264300$2001a8c0@mantis>
Hi Jonathan
I've posted the scripts i use on sourceforge
http://bastionx.sourceforge.net
then main rc.bastionx script has a simple search and
replace feature for acls on ip or alias ...
It only does INPUT,OUTPUT and FORWARD chains but
could be adpated to be more generic.
Cheers
Craig
On Wed, 2004-10-06 at 11:24, Jonathan wrote:
> Hi, if this is a classic case of RTFM go ahead and shoot me.
>
> Is there an option or a command to look up rules in your iptables,
> especially if there's the ability to search by rulenumber or some
> kind of key?
>
> The only solution I've seen so far, is to use the -l option, capture the
> output, and then process it, but that's a very dirty solution.
> I'm writing a script that needs to update the iptables automatically, and I
> assume it needs to know whether ot use the add or update
> option by verifying whether a rule exists, in order to decide whether to
> update the rule, or add a new one.
>
> Jonathan
>
prev parent reply other threads:[~2004-10-06 7:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 3:24 ways to lookup or query rules? Jonathan
2004-10-06 3:38 ` J Kim
2004-10-06 4:27 ` Jonathan
2004-10-06 7:41 ` Craig Steadman [this message]
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=1097048478.10818.89.camel@e500 \
--to=spinout@yakbox.shacknet.nu \
--cc=jonathan@jonathan.abda.net \
--cc=netfilter@lists.netfilter.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.