From owner-freebsd-questions@FreeBSD.ORG Tue Jun 10 22:35:18 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99FE5106566C for ; Tue, 10 Jun 2008 22:35:18 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id A70118FC22 for ; Tue, 10 Jun 2008 22:35:17 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.2/8.14.2) with ESMTP id m5AMZFka022711; Wed, 11 Jun 2008 00:35:15 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.2/8.14.2/Submit) with ESMTP id m5AMZE9h022696; Wed, 11 Jun 2008 00:35:14 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 11 Jun 2008 00:35:14 +0200 (CEST) From: Wojciech Puchar To: Matthew Seaman In-Reply-To: <484EA9AE.2010407@infracaninophile.co.uk> Message-ID: <20080611003049.Y21896@wojtek.tensor.gdynia.pl> References: <20080610152240.GB66787@kokopelli.hydra> <484EA9AE.2010407@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Questions Subject: Re: firewall high-load performance 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: Tue, 10 Jun 2008 22:35:18 -0000 > High load may or may not be a problem depending on your traffic patterns. > I've seen pf firewalls suffer by running out of state-table space in > situations where there are a lot of fairly short-lived but low volume > network connections. The default is 10,000 states. If your firewall machine is this state-table a hash table or something similar. if so - making it much bigger than CPU cache may actually slow down things because DRAM access latency is huge on modern machines. > On the whole I'd go with pf every time simply based on how much more > manageable it is compared to ipfw -- you have to try, hard, to lock > yourself out when reloading a new pf ruleset. i already learned well locking myself after making mistake in ipfw rules now i run screen and do something like that cd /etc cp firewall firewall.old cp firewall firewall.new firewall.new cp firewall.new firewall;/etc/rc.d/ipfw restart;sleep 100;cp firewall.old firewall;/etc/rc.d/ipfw restart then i have 100 seconds to quickly test new rules, at least to make sure i'm not locked.