一键卸载某厂云盾脚本

 

 

基于某些原因,用不到阿里云盾(安骑士),但在使用LIUNX系统时,会被自动的安装上阿里云盾(安骑士)的WAF防火墙的免费版,这个免费版的防火墙除了记示一此漏洞,扫描或是注入攻击等一些记录外,感觉也没有啥用。如果需要修复漏洞或是防止扫描或注入的攻击,就需要用到收费版了

第一步:脚本卸载

脚本1:

  1. wget http://update.aegis.aliyun.com/download/uninstall.sh
  2. chmod +x uninstall.sh
  3. ./uninstall.sh

脚本2:

  1. wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
  2. chmod +x quartz_uninstall.sh
  3. ./quartz_uninstall.sh

第二步:删除残留

  1. pkill aliyun-service
  2. rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
  3. rm -rf /usr/local/aegis*

第三步:屏蔽云盾IP

  1. iptables -I INPUT -s 140.205.201.0/28 -j DROP
  2. iptables -I INPUT -s 140.205.201.16/29 -j DROP
  3. iptables -I INPUT -s 140.205.201.32/28 -j DROP
  4. iptables -I INPUT -s 140.205.225.192/29 -j DROP
  5. iptables -I INPUT -s 140.205.225.200/30 -j DROP
  6. iptables -I INPUT -s 140.205.225.184/29 -j DROP
  7. iptables -I INPUT -s 140.205.225.183/32 -j DROP
  8. iptables -I INPUT -s 140.205.225.206/32 -j DROP
  9. iptables -I INPUT -s 140.205.225.205/32 -j DROP
  10. iptables -I INPUT -s 140.205.225.195/32 -j DROP
  11. iptables -I INPUT -s 140.205.225.204/32 -j DROP

通过iptables进行屏蔽阿里云盾的IP地址,不让其扫过来。前期是我们的服务器有开启iptables防火墙,如果没有开启则需要开启。
总结,通过上面的办法可以卸载阿里云盾和安骑士,我们可以在完毕之后重启服务器再检查自己在阿里云服务器中的项目是否正常。

posted @ 2020-06-24 10:14  Fallin  阅读(314)  评论(0)    收藏  举报