Skip to content

Instantly share code, notes, and snippets.

@zhouyanyu
Created May 15, 2020 00:51
Show Gist options
  • Save zhouyanyu/3ec73fe8f0b77ffd6d56a4cc2aa18c32 to your computer and use it in GitHub Desktop.
Save zhouyanyu/3ec73fe8f0b77ffd6d56a4cc2aa18c32 to your computer and use it in GitHub Desktop.

如何完全卸载阿里云盾

卸载阿里云盾

远程连接到阿里云云服务器或者轻量应用服务器后,执行以下代码卸载阿里云盾:

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
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
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

检查阿里云盾是否卸载干净

最后检查下自己服务器上的阿里云盾是否卸载干净了,主要就是看进程里有没有阿里云盾的相关进程了(AliYunDun、aliyun-service和AliYunDunUpdate),可以通过 ps -aux | grep -E 'aliyun|AliYunDun'来检查,如果没有相关进程则说明阿里云盾已经卸载干净了。

@zhouyanyu
Copy link
Author

Linux-NetSpeed安装

wget -N --no-check-certificate "https://raw.githubusercontent.com/dlxg/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

@zhouyanyu
Copy link
Author

ssr脚本安装

git clone https://github.com/zhouyanyu/ssr.git

@zhouyanyu
Copy link
Author

将默认shell更改为bash。

bash支持C语言格式的for循环

sudo dpkg-reconfigure dash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment