CentOS 关闭和清除阿里云盾

新服务器自带阿里云盾,查了半天不知道这货有啥作用,于是卸载.

卸载前

1
2
3
4
5
6
7
8
9
10
11
12
[root@caoxl ~]# top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1090 root 20 0 129592 11276 9220 S 0.3 0.3 14:08.23 AliYunDun
1 root 20 0 43284 3680 2500 S 0.0 0.1 0:03.06 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u4:0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:23.12 rcu_sched
10 root rt 0 0 0 0 S 0.0 0.0 0:01.04 watchdog/0

方法一 卸载云盾监控屏蔽 IP

    1. 卸载阿里云盾监控
1
2
3
4
5
6
7
8
9
10
11
[root@caoxl download]# wget http://update.aegis.aliyun.com/download/uninstall.sh
[root@caoxl download]# sh uninstall.sh
Stopping aegis [ OK ]
umount: /usr/local/aegis/aegis_debug: mountpoint not found
Uninstalling aegis [ OK ]

[root@caoxl download]# wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
[root@caoxl download]# sh quartz_uninstall.sh
Stopping aegis [ OK ]
Stopping quartz [ OK ]
Uninstalling aegis_quartz [ OK ]
    1. 删除残留
1
2
3
[root@caoxl download]# pkill aliyun-service
[root@caoxl download]# rm -rf /etc/init.d/agentwatch /usr/sbin/aliyun-service
[root@caoxl download]# rm -rf /usr/local/aegis*
    1. 屏蔽云盾 IP
1
2
3
4
5
6
7
8
9
10
11
[root@caoxl download]# iptables -I INPUT -s 140.205.201.0/28 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.201.16/29 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.201.32/28 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.192/29 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.200/30 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.184/29 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.183/32 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.206/32 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.205/32 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.205/32 -j DROP
[root@caoxl download]# iptables -I INPUT -s 140.205.225.204/32 -j DROP

方法二 CentOS 关闭 AliYunDun

使用 chkconfig --list 查看开机启动里面这个软件的服务名是什么,然后替换掉 xxx 然后执行就可以了。
如果想开机不启动的话,chkconfig --del xxx 这个 xxx 就是你找出来的 aliyundun 的后台服务。

1
2
3
4
5
6
7
8
[root@caoxl /]# chkconfig --list
aegis 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
php-fpm-56 0:off 1:off 2:on 3:on 4:on 5:on 6:off
php-fpm-72 0:off 1:off 2:on 3:on 4:on 5:on 6:off
shadowsocks 0:off 1:off 2:on 3:on 4:on 5:on 6:off
1
2
service aegis stop      # 停止服务
chkconfig --del aegis # 删除服务

方法三 阿里云服务器关闭云盾

阿里云服务器查杀关闭云盾进程

1
2
3
4
5
6
7
8
9
10
11
12
[root@caoxl ~]# top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1090 root 20 0 129592 11276 9220 S 0.3 0.3 14:08.23 AliYunDun
1 root 20 0 43284 3680 2500 S 0.0 0.1 0:03.06 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u4:0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:23.12 rcu_sched
10 root rt 0 0 0 0 S 0.0 0.0 0:01.04 watchdog/0

查杀关闭云盾进程处理过程如下:

1
2
3
[root@caoxl /]# ps -ef | grep -v grep | grep -i aliyundun
[root@caoxl /]# ps -ef | grep -v grep | grep -i aliyundun | awk '{print $2}'
[root@caoxl /]# ps -ef | grep -v grep | grep -i aliyundun | awk '{print $2}' | xargs kill -9

卸载后

1
2
3
4
5
6
7
8
9
10
11
 [root@caoxl /]# top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 43284 3680 2500 S 0.0 0.1 0:03.07 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u4:0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:23.16 rcu_sched
10 root rt 0 0 0 0 S 0.0 0.0 0:01.04 watchdog/0

删除阿里云登录界面欢迎信息

Welcome to Alibaba Cloud Elastic Compute Service !

1
vim /etc/motd  # 就可以自己编辑欢迎信息了

Powered by Hexo and Hexo-theme-hiker

Copyright © 2017 - 2023 Keep It Simple And Stupid All Rights Reserved.

访客数 : | 访问量 :