如果防火墙有重复的IP, 删除重复的
iptables -vnL|grep DROP | awk '{ print $8}' | grep -v "0.0.0.0" |awk '/[0-9]/' | sort | uniq -c|sort -nr |awk '{if($1 >1) print $1" "$2}' |awk '{for(i=1;i<=$1-1;i++) print "iptables -D INPUT -s " $2 " -j DROP" | "bash" } '
如果防火墙有重复的IP, 删除重复的
iptables -vnL|grep DROP | awk '{ print $8}' | grep -v "0.0.0.0" |awk '/[0-9]/' | sort | uniq -c|sort -nr |awk '{if($1 >1) print $1" "$2}' |awk '{for(i=1;i<=$1-1;i++) print "iptables -D INPUT -s " $2 " -j DROP" | "bash" } '