前段时间收到了阿里云的扫描通知。

事情不大,但是很反感。

在这之前已经卸载了云盾,但是没彻底清除,加上也没屏蔽阿里云的IP端吧。

在官网找了很久,都没有个完全卸载的文档,官方只让在阿里云操作后台去卸载。

但是哪里的卸载其实并没啥用...

然后在官方论坛找到了卸载命令,不过也没外面网络的详细。

看了下外面的很多教程都是一样的,只是IP端不同,最常见的是提到了:140开头的,偶尔有人提到106。

因为这两个是阿里云官方公开的,其实在阿里云文档里面还有好几个IP端。

不过有个10和100开头的可以不用管。

参考:https://help.aliyun.com/document_detail/44279.html

现在说卸载过程吧:

一、卸载安骑士

如果在后台也开启了,得后台也去关闭下。

wget http://update.aegis.aliyun.com/download/uninstall.sh

chmod +x uninstall.sh

./uninstall.sh

wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh

chmod +x quartz_uninstall.sh

./quartz_uninstall.sh

 

二、删除删留文件

pkill aliyun-service

rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service

rm -rf /usr/local/aegis*

 

三、屏蔽扫描IP

这个就根据是哪些IP在扫描来了

比如:

iptables -I INPUT -s 140.205.201.0/28 -j DROP

如果是用的CentOS7 firewall防火墙:

firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='106.11.224.0/26' reject"

当然也可以直接写成脚本运行。

#!/bin/bashecho "屏蔽IP......."
iptables -I INPUT -s 140.205.201.0/28 -j DROP
iptables -I INPUT -s 106.11.224.0/26 -j DROP
echo "屏蔽IP"

保存为一个.sh文件,然后放服务器里面运行。

最后最好保存下新的防火墙规则:

service iptables save

firewall-cmd --reload