Re: Questoin on iptables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux