From owner-freebsd-ipfw Tue Jul 16 23:46:52 2002 Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2802D37B400 for ; Tue, 16 Jul 2002 23:46:50 -0700 (PDT) Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6356943E65 for ; Tue, 16 Jul 2002 23:46:49 -0700 (PDT) (envelope-from crist.clark@attbi.com) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020717064649.NSH26053.rwcrmhc53.attbi.com@blossom.cjclark.org>; Wed, 17 Jul 2002 06:46:49 +0000 Received: from blossom.cjclark.org (localhost. [127.0.0.1]) by blossom.cjclark.org (8.12.3/8.12.3) with ESMTP id g6H6kmJK023476; Tue, 16 Jul 2002 23:46:48 -0700 (PDT) (envelope-from crist.clark@attbi.com) Received: (from cjc@localhost) by blossom.cjclark.org (8.12.3/8.12.3/Submit) id g6H6klHr023475; Tue, 16 Jul 2002 23:46:47 -0700 (PDT) X-Authentication-Warning: blossom.cjclark.org: cjc set sender to crist.clark@attbi.com using -f Date: Tue, 16 Jul 2002 23:46:47 -0700 From: "Crist J. Clark" To: Luigi Rizzo Cc: ipfw@FreeBSD.ORG Subject: Re: Ouch! ipfw log and DoS Message-ID: <20020717064647.GC22967@blossom.cjclark.org> Reply-To: "Crist J. Clark" References: <20020716124059.A2635@iguana.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020716124059.A2635@iguana.icir.org> User-Agent: Mutt/1.4i X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Jul 16, 2002 at 12:40:59PM -0700, Luigi Rizzo wrote: > it just occurred to me that if you have > > ipfw add accept log > > and you log to a remote host and your syslog messages match your > pattern, then you have created a loop. > There are endless variations of the above. > > Bottom line is that (i believe) log messages generated by ipfw should > be rate-limited to some not-too-large value (maybe controlled by > a sysctl variable). > > Any objections if i implement that (which probably amounts to > the following lines of code at the beginnning of ipfw_log(): > > ---------------- > static last_log, log_left; > > if (last_log != time_second) { > last_log = time_second; > log_left = ipfw_log_rate; > } > if (log_left == 0) > return; > log_left--; > ---------------- Errr... Isn't this syslogd(8)'s job? -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message