--On Sunday, July 18, 2004 11:43 AM -0600 Aaron Dalton <[EMAIL PROTECTED]> wrote:

I am using Doorman (http://doorman.sourceforge.net)as a port knocking
daemon and I need to write a short script that adds and deletes rules to
the ipfw firewall.  I can add them just fine, but I can't find the best
way to delete them.  Is the only way to specify the exact rule number?

Yes.

Just use awk to extract the number. One way to handle it would be to write each add rule to a text file. Then, when you want to delete the rule, you grab the IP address from the text file, and then use awk to find the right rule. Something like this:

${fwcmd} delete `awk '/$IP/ {print $1}'`

Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
The University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to