Re: ways to lookup or query rules?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux