Skip to content

Instantly share code, notes, and snippets.

@kmahyyg
Last active December 7, 2020 18:30
Show Gist options
  • Select an option

  • Save kmahyyg/4336dde93d21443cf62abb9c604f95d7 to your computer and use it in GitHub Desktop.

Select an option

Save kmahyyg/4336dde93d21443cf62abb9c604f95d7 to your computer and use it in GitHub Desktop.
fuckaliyun
dpkg -P aliyun-assist
rm -rf /usr/local/aegis
rm -rf /etc/systemd/system/{aliyun,aegis}.service
rm -rf /usr/sbin/acs-plugin-manager
rm -rf /usr/sbin/aliyun{_installer,-service}
rm -rf /usr/local/share/aliyun-assist
rm -rf /etc/init.d/aegis
systemctl disable --now aegis,aliyun,atd,rsyslog
# Use script above
# Try download binaries
#disable auto upgrade
cat << EOF > /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "1";
EOF
106.11.68.0/24 80
110.75.102.0/24 80
140.205.140.0/24 80
42.156.166.0/24 80
10.143.23.0/24 80 443
100.100.25.0/24 80 443
110.173.196.0/24 80 443
110.75.114.0/24 80 443
/usr/local/cloudmonitor/
私网
10.181.0.186
10.181.0.187
10.181.2.120
10.181.2.126
公网
140.205.205.7
140.205.205.6
140.205.205.15
140.205.205.11
华北1(青岛) 47.104.162.123
华北2(北京) 39.107.84.97
华东1(杭州) 47.97.187.10
华东2(上海) 47.100.176.74
华南1(深圳) 120.78.69.183
大连联通cn335线路 211.93.148.207
中国香港 47.52.224.185
新加坡 47.74.135.107
澳大利亚(悉尼) 47.91.45.70
马来西亚(吉隆坡) 47.254.197.21
美国(弗尼吉亚) 47.90.210.37
美国(硅谷) 47.254.31.65
德国(法兰克福) 47.254.133.240
中国内地 121.43.18.0/24,120.25.115.0/24,101.200.106.0/24,120.55.177.0/24,120.27.173.0/24,120.55.107.0/24,123.57.117.0/24,120.76.16.0/24,182.92.253.32/27,60.205.193.64/27,60.205.193.96/27,120.78.44.128/26,118.178.15.0/24,39.106.237.192/26,106.15.101.96/27,47.101.16.64/27,47.106.31.0/24,47.98.74.0/25,47.97.242.96/27,112.124.159.0/24,39.96.130.0/24,39.96.119.0/24,47.99.20.0/24,47.104.53.0/26,47.108.23.192/26,39.104.199.128/26,39.96.158.0/24,47.110.182.0/24,120.77.139.0/25,47.102.187.0/25
海外地区 47.89.1.160/27,47.89.7.192/26,47.88.145.96/27,47.88.250.0/24,47.52.120.0/24,47.254.217.32/27,47.88.74.0/24,47.89.132.224/27,47.91.69.64/27,47.91.54.128/27,47.74.160.0/24,47.91.113.64/27,149.129.211.0/27,149.129.140.0/27,8.208.2.192/27,47.56.50.0/24,161.117.161.0/25,147.139.22.0/25,8.209.192.0/25
#!/bin/bash
# Part 1 : Kill aegis and aliyun services
curl -sSL http://update.aegis.aliyun.com/download/uninstall.sh | sudo bash
curl -sSL http://update.aegis.aliyun.com/download/quartz_uninstall.sh | sudo bash
sudo rm -rf /usr/local/aegis
sudo rm /usr/sbin/aliyun-service
sudo rm /lib/systemd/system/aliyun.service
sudo rm -rf /usr/local/share/aliyun* # remove aliyun-assist
# Part 2 : ban the aegis ip
sudo iptables -A INPUT -s 140.205.201.0/24 -j DROP
sudo iptables -A INPUT -s 140.205.225.0/24 -j DROP
echo "Successfully cleanup the aliyun agent services!"
echo "Thanks to https://blog.whe.me/post/uninstall-aliyun-monitoring.html"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment