将惡意登陸IP添加到(dào)防火(huǒ)牆
來(lái)源:創立工(gōng)作(zuò)室 作(zuò)者:馮軍 發布時(±¥ shí)間(jiān):2024-07-23 11:β50:46 閱讀(dú) 1160 次
#!/bin/bash
#auther: 51clocker
#blog: ®βhttp://www.51clocker.com
#email: admin@51clocλ"ker.com
#desc: a simple script to add Fai₩€×↔led login ip to iptables.
num=10
for i↑♥£ in `awk '/Failed/{print $(NF-3)}' /var/lo>✔♠↓g/secure|sort|uniq -c|sort -nr|awk '{if($1&✔≠;gt;$num){print $2}}'`
do
≥↑>↓ iptables -I INPUT ₽©Ω-p tcp -s $i --dport 22 -j DROP
done
- 上(shàng)一(yī)篇:監控mysql啓動情況并檢測表錯(cuò)誤修複
- 下(xià)一(yī)篇:帝國(guó)CMS用(yòng)靈動标簽調用(yòng)tag的(de)最詳細教程