用过阿里云的ECS的都知道,ECS会自动安装阿里云盾,其实是个没什么用的东西,很多人购买了ECS之后会立马关闭甚至卸载它。
以下是centos 7 的关闭、卸载的方法。
1、centos 7 关闭阿里云盾
xshell进入centos命令行,
# chkconfig --list // 看一下aliyundun是否在开机自启的选项里
图中aegis就是aliyunudn的服务,停掉它
# chkconfig --del aegis // 删除服务
# service aegis stop //停止服务
2、卸载
工具卸载:
# wget http://update.aegis.aliyun.com/download/uninstall.sh
# sh uninstall.sh
# wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
# sh quartz_uninstall.sh
删除残余:
# pkill aliyun-service
# rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
# rm -rf /usr/local/aegis*
屏蔽阿里ip:
安装了firewalld的执行以下命令:
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.201.0/28' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.201.16/29' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.201.32/28 ' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.192/29' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.200/30' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.184/29' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.183/32' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.206/32' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.205/32' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.195/32' reject"
# firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='140.205.225.204/32' reject"
# firewall-cmd --reload
安装了iptables的执行以下命令
# systemctl restart iptables.service
感谢博主,喝杯咖啡~
还没有人发表评论