Date: Fri, 09 Apr 2010 11:25:46 +0200 From: Ivan Voras <ivoras@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: load ipfw table addresses from file Message-ID: <hpmrqh$hnu$1@dough.gmane.org> In-Reply-To: <4BBEE016.9060108@elischer.org> References: <4BBECFDB.6080001@lissyara.su> <20100409111412.11e340b7@hzwork.vyborg.ru> <4BBEDF2B.5020102@lissyara.su> <4BBEE016.9060108@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hpmrqh$hnu$1>