From owner-freebsd-net@FreeBSD.ORG Thu Jul 13 18:59:37 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 085FF16A4DD for ; Thu, 13 Jul 2006 18:59:37 +0000 (UTC) (envelope-from dmitry@atlantis.dp.ua) Received: from postman.atlantis.dp.ua (postman.atlantis.dp.ua [193.108.47.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 507FB43D45 for ; Thu, 13 Jul 2006 18:59:36 +0000 (GMT) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by postman.atlantis.dp.ua (8.13.1/8.13.1) with ESMTP id k6DIxPCk003155; Thu, 13 Jul 2006 21:59:25 +0300 (EEST) (envelope-from dmitry@atlantis.dp.ua) Date: Thu, 13 Jul 2006 21:59:25 +0300 (EEST) From: Dmitry Pryanishnikov To: Brian Candler In-Reply-To: <20060713214311.T73434@atlantis.atlantis.dp.ua> Message-ID: <20060713215647.D73434@atlantis.atlantis.dp.ua> References: <20060712083020.GA2607@uk.tiscali.com> <20060713214311.T73434@atlantis.atlantis.dp.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, Ensel Sharon Subject: Re: counting (not) blocks of IPs in ipfw - please help X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jul 2006 18:59:37 -0000 On Thu, 13 Jul 2006, Dmitry Pryanishnikov wrote: >> # ipfw add 00100 count ip from { not 10.20.0.0/16 and not 10.30.0.0/16 } to >> any via fxp0 in >> ipfw: missing ")" > > Correct, there is no 'and' keyword in ipfw syntax, since it's redundant: > a simple ',' in address list means 'and'. So this can be written as: Umm, sorry, of course ',' means 'or': 10.20.0.0/16,10.30.0.0/16 matches 10.20.0.0/16 OR 10.30.0.0/16 > ipfw add 100 count ip from not 10.20.0.0/16,10.30.0.0/16 to any via fxp0 in Yet this construction is correct and means exactly that: packets NOT from ( 10.20.0.0/16 OR 10.30.0.0/16). Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE