Under normal circumstances, our AliCloud servers will install AliCloud Shield and AnKnight software by default. The main purpose is to automatically detect the security of the server and give certain warnings. If our general project is OK, install it, but it may occupy some server resources. However, by default, the basic version is free of charge and only provides tips. If you need to solve and understand security problems more deeply, you need to pay for the upgrade. Maybe this is the routine.
Today, Lao Zuo comes to share how to Uninstall AliCloud Shield The script of the one button package with Anqi is from Alibaba Cloud. However, it should be noted that if there are projects in our server, it is recommended to take a snapshot backup first. In case of problems, we cannot afford to take a snapshot backup. In fact, it is not a problem not to uninstall, but some people may need to uninstall because some projects will be blocked.
You may also need to:
1、 Alibaba Cloud lightweight application server basic station building system deployment Web environment and application
2、 Canceling the setting of disabling PING by default for Alibaba Cloud ECS servers
3、 Alibaba Cloud OSS separate storage of WordPress media files using the OSS Upload plug-in
First, preparations
The importance of backup. If we have more important data in Alibaba Cloud servers, no matter whether it is important or not, it should be backed up when we are unfamiliar with commands and software. Or learn from Lao Zuo to test in a test machine in advance before implementing in the production environment. In any case, backup is necessary. Sometimes even the experts may have problems.

Second Uninstall AliCloud Shield He'an Knight
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

Third, clean up residual files
pkill aliyun-service
rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
rm -rf /usr/local/aegis*

Fourth, block AliCloud Shield IP addresses
iptables -I INPUT -s 140.205.225.183/32 -j DROP
iptables -I INPUT -s 140.205.225.206/32 -j DROP
iptables -I INPUT -s 140.205.225.205/32 -j DROP
iptables -I INPUT -s 140.205.225.195/32 -j DROP
iptables -I INPUT -s 140.205.225.204/32 -j DROP
iptables -I INPUT -s 140.205.201.0/28 -j DROP
iptables -I INPUT -s 140.205.201.16/29 -j DROP
iptables -I INPUT -s 140.205.201.32/28 -j DROP
iptables -I INPUT -s 140.205.225.192/29 -j DROP
iptables -I INPUT -s 140.205.225.200/30 -j DROP
iptables -I INPUT -s 140.205.225.184/29 -j DROP
Use iptables to mask the IP address of Alibaba Cloud Shield and prevent it from scanning. In the early stage, our server has enabled the iptables firewall. If it is not enabled, it needs to be enabled.
To sum up, we can uninstall AliCloud Shield and Anqi through the above method. After that, we can restart the server and check whether our projects in AliCloud server are normal. If the problem needs to be checked, or we can restore the previous backup to solve the problem.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge