From owner-freebsd-net@FreeBSD.ORG Thu May 29 15:16:08 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 2192C37B401 for ; Thu, 29 May 2003 15:16:08 -0700 (PDT) Received: from ints.mail.pike.ru (ints.mail.pike.ru [195.9.45.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88DDD43F85 for ; Thu, 29 May 2003 15:16:06 -0700 (PDT) (envelope-from babolo@cicuta.babolo.ru) Received: (qmail 43610 invoked from network); 29 May 2003 22:36:39 -0000 Received: from babolo.ru (HELO me) (194.58.226.160) by ints.mail.pike.ru with SMTP; 29 May 2003 22:36:39 -0000 Received: (nullmailer pid 6874 invoked by uid 136); Thu, 29 May 2003 22:19:47 -0000 X-ELM-OSV: (Our standard violations) hdr-charset=KOI8-R; no-hdr-encoding=1 In-Reply-To: <20030528045154.GA95572@mail.it.ca> To: Paul Chvostek Date: Fri, 30 May 2003 02:19:47 +0400 (MSD) From: "."@babolo.ru X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <1054246787.649875.6873.nullmailer@cicuta.babolo.ru> cc: freebsd-net@freebsd.org Subject: Re: ipfw rules vs routes to localhost? 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: Thu, 29 May 2003 22:16:08 -0000 > I'm considering: > > ipfw add N deny ip from a.b.c.d to any > > vs. > > route add -host a.b.c.d localhost > > I need to block traffic to a number of IP addresses. I thought I'd use > ipfw to avoid things like UDP DNS lookups that might come in ant take up > resources while my system tried to respond, but it's been suggested on > another list that setting routes to localhost will use less resources. > Ideally, I'd like to be able to block a few tens of thousands of IPs. > > What's the scoop? ipfw with huge list works slow. Dont try huge route tables. use in kernel: pseudo-device disc #Discard device (ds0, ds1, etc) and ifconfig ds0 inet 0.0.0.1/32 (or else) route add -host a.b.c.d 0.0.0.1 instead of localhost