On 07/15/2014 11:09 AM, Alexander Dalloz wrote:
> Running without the pipe construct because awk can do that all by itself
> (reading the source file and inverse greping):
>
> while read ipblock
> do
>       $IPTABLES -A Spamhaus -s $ipblock -j DROP
> done < <(awk '!/^;/ { print $1 }' $FILE)
>
> Alexander
Thanks Alexander,

Indeed you are right it can be done and with very big files it will mean 
a lot.

Also he might consider to use ipset instead of basic iptables to make 
the lookup a bit faster but it should be ok as it is.

Eliezer
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to