From owner-freebsd-current@FreeBSD.ORG Fri Apr 9 09:25:59 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E923E1065677 for ; Fri, 9 Apr 2010 09:25:59 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id B5BBD8FC16 for ; Fri, 9 Apr 2010 09:25:58 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O0ATH-0001qL-ES for freebsd-current@freebsd.org; Fri, 09 Apr 2010 11:25:51 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Apr 2010 11:25:51 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Apr 2010 11:25:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Fri, 09 Apr 2010 11:25:46 +0200 Lines: 27 Message-ID: References: <4BBECFDB.6080001@lissyara.su> <20100409111412.11e340b7@hzwork.vyborg.ru> <4BBEDF2B.5020102@lissyara.su> <4BBEE016.9060108@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.8) Gecko/20100329 Thunderbird/3.0.3 In-Reply-To: <4BBEE016.9060108@elischer.org> X-Enigmail-Version: 1.0.1 Subject: Re: load ipfw table addresses from file X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 09:26:00 -0000 On 04/09/10 10:06, Julian Elischer wrote: > On 4/9/10 1:02 AM, Alex Keda wrote: >> 09.04.2010 11:14, Hizel Ildar пишет: > >>>> # wc -l /root/scripts/db/table.25.txt >>>> 61073 /root/scripts/db/table.25.txt >>>> # date&& for i in `cat /root/scripts/db/table.25.txt`; do ipfw table >>>> 25 add $i; done&& date >>>> пятница, 9 апреля 2010 г. 10:42:01 (MSD) >>>> пятница, 9 апреля 2010 г. 10:52:43 (MSD) >>>> # >>>> it took more than 10 minutes on busy server =( >>>> _______________________________________________ > [...] > >>> but file like: >>> table 25 add 192.168.0.36 >>> table 25 add 192.168.0.37 >>> table 25 add 192.168.0.38 >> thanks, it is faster, but - this is a crutch =) > > yes but it is a crutch that is 600 times faster. I've never used the feature but ipfw has "-p preprocessor" argument which looks like it might be used to process the file containing raw IP addresses with a simple script that appends "table 25 add" to each address before returning it to ipfw.