From owner-freebsd-net@FreeBSD.ORG Tue Sep 9 00:03:48 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4368416A4BF for ; Tue, 9 Sep 2003 00:03:48 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97C8343FF2 for ; Tue, 9 Sep 2003 00:03:47 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.8p1/8.12.3) with ESMTP id h8973lkN097542; Tue, 9 Sep 2003 00:03:47 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.8p1/8.12.3/Submit) id h8973lPd097541; Tue, 9 Sep 2003 00:03:47 -0700 (PDT) (envelope-from rizzo) Date: Tue, 9 Sep 2003 00:03:47 -0700 From: Luigi Rizzo To: Josh Brooks Message-ID: <20030909000347.A90081@xorpc.icir.org> References: <20030908234910.H77579-100000@mail.econolodgetulsa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030908234910.H77579-100000@mail.econolodgetulsa.com>; from user@mail.econolodgetulsa.com on Mon, Sep 08, 2003 at 11:50:53PM -0700 cc: freebsd-net@freebsd.org Subject: Re: how do I delete just one ipfw rule ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 07:03:48 -0000 On Mon, Sep 08, 2003 at 11:50:53PM -0700, Josh Brooks wrote: > > Hi, > > If I create two ipfw rules with the same ID: > > ipfw add 00022 deny ip from x to y > ipfw add 00022 allow ip from z to b > > they will both be there, and both work ... but is it possible to remove > just one of them wihout removing the other ? Right now I am doing a hack > with a ";" > > ipfw del 00022 ; ipfw add 00022 allow ip from z to b > > which removes both, and re-adds the one I want, but if the list gets more > complicated than a few, this is really bad. > > So is it possible to remove just one ipfw rule from a list of same-index > rules ? no, it is not possible to delete them -- you have no way to tell which rule to delete when multiple rules share the same number. cheers luigi