From owner-freebsd-net@FreeBSD.ORG Tue Jun 20 20:57:33 2006 Return-Path: X-Original-To: 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 25E9416A474 for ; Tue, 20 Jun 2006 20:57:33 +0000 (UTC) (envelope-from regnauld@macbook.catpipe.net) Received: from macbook.catpipe.net (x0.dk [62.242.165.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF18043D5E for ; Tue, 20 Jun 2006 20:57:32 +0000 (GMT) (envelope-from regnauld@macbook.catpipe.net) Received: by macbook.catpipe.net (Postfix, from userid 1001) id B9CB4D7D53; Tue, 20 Jun 2006 22:57:30 +0200 (CEST) Date: Tue, 20 Jun 2006 22:57:30 +0200 From: Phil Regnauld To: Brett Glass Message-ID: <20060620205730.GC3968@catpipe.net> References: <7.0.1.0.2.20060620143845.06662330@lariat.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7.0.1.0.2.20060620143845.06662330@lariat.org> X-Operating-System: Darwin 8.6.1 i386 Organization: catpipe Systems ApS User-Agent: Mutt/1.5.11 Cc: net@freebsd.org Subject: Re: Best way to block a long list of IPs? 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: Tue, 20 Jun 2006 20:57:33 -0000 Brett Glass (brett) writes: > > I've got an application in which I must block incoming TCP > connections to a FreeBSD server from a potentially large list of IP > addresses. Using IPFW is not a very efficient way to accomplish > this, because it must do a linear search of a list (either one > address per rule or an "or" list in a rule) and this could slow > down every packet entering the machine dramatically. pf tables are VERY efficient -- man pf.conf