最近觀察 ubuntu WWW Server 的 LOG 發現,有 login.cgi 的連線
# tail /var/log/apache2/other_vhosts_access.log
Google 了一下相關資料
New Threat Report: A new IoT Botnet is Spreading over HTTP 81 on a Large Scale
寫個 netfilter 規則擋掉吧~~~
for ATTACK_IP in $(grep login.cgi /var/log/apache2/other_vhosts_access.log | awk ‘{ print $2 }’ | sort | uniq)
do
#echo $ATTACK_IP
/sbin/iptables -t filter -A INPUT -p tcp -s $ATTACK_IP –dport 81 -j DROP
done
確認一下規則!
# iptables -t filter -L -n | grep :81
加入 crontab 排程,這樣就可以定期更新啦~~~