shell 过滤ip防火墙禁用
for
ip
in
`cat dropip`
do
if
[[ $ip =~
"192.168"
]] || [[ $ip =~
"127"
]]; then
echo
"pass"
else
echo
"$ip"
iptables -I INPUT -p tcp -s $ip -j DROP
fi
done