一个杀探测22端口密码shell
时间:2006-11-27 来源:lqlboy_new
#!/bin/sh
PORT_NUM=`netstat -na|grep 22|wc -l`
CON_IP=`netstat -na|grep 22 |tail -1|awk -F ":" '{print $8}'`
if [ "$PORT_NUM" -gt "20" ]
then
echo "This it to many connects : $CON_IP"
/sbin/iptables -A INPUT -s $CON_IP -dport 22 -j DENY
fi
PORT_NUM=`netstat -na|grep 22|wc -l`
CON_IP=`netstat -na|grep 22 |tail -1|awk -F ":" '{print $8}'`
if [ "$PORT_NUM" -gt "20" ]
then
echo "This it to many connects : $CON_IP"
/sbin/iptables -A INPUT -s $CON_IP -dport 22 -j DENY
fi
相关阅读 更多 +