lastb |less
lastb |tail
lastb |head
可以寫個腳本,失敗多少次後,就扔到/etc/hosts.deny裡面去
如:
lastb |awk '{print $3}' |sort |uniq -c |sort -rn |awk '{print $2}' |head -25 |while read L;do echo "sshd:$L" >> /etc/hosts.deny;done
不生效可能是因為ldd /usr/sbin/sshd後沒找到libwrap.so.0
參考文章http://75clouds.blog.51cto.com/3054635/1669397
本文轉自 朱科強 51CTO部落格,原文連結:http://blog.51cto.com/zhukeqiang/1944941,如需轉載請自行聯系原作者