From owner-freebsd-questions@FreeBSD.ORG Fri Jun 24 04:17:49 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F194B16A41C for ; Fri, 24 Jun 2005 04:17:49 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D59A43D49 for ; Fri, 24 Jun 2005 04:17:48 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 23244 invoked by uid 207); 24 Jun 2005 04:17:47 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.42):. Processed in 0.401943 secs); 24 Jun 2005 04:17:47 -0000 Received: from dialup42.ach.sch.gr (HELO gothmog.gr) ([81.186.70.42]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 24 Jun 2005 04:17:46 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j5O4HZ1R065674; Fri, 24 Jun 2005 07:17:35 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j5O4HZ5E065673; Fri, 24 Jun 2005 07:17:35 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 24 Jun 2005 07:17:34 +0300 From: Giorgos Keramidas To: fbsd_user@a1poweruser.com Message-ID: <20050624041734.GB65405@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-questions@freebsd.org Subject: Re: IPF adding single rule X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2005 04:17:50 -0000 On 2005-06-23 22:10, fbsd_user wrote: > ipfstat -ni lists the in core inbound rules with their line number > Say I want to add a single rule before rule line number 17 > If I have a file addrule with 17 block in quick on dc0 from any to any > and then issue ipf -f addrule I get error that 17 is unknown keyword (17) > > Is there any way to insert a rule into the in core rules at the desired > location and then later just remove that rule?? Yes there is a way. You just have to prefix the rule number with '@'. # ipf -f - @17 block in quick on dc0 from any to any ^D This is apparent in the second BNF rule in the description of the IPF syntax, documented in ipf.conf(5).