Skip to content

Instantly share code, notes, and snippets.

@liruqi
Last active October 2, 2020 14:51
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save liruqi/a3279699acd1d179350fadb034953fac to your computer and use it in GitHub Desktop.
Save liruqi/a3279699acd1d179350fadb034953fac to your computer and use it in GitHub Desktop.
Block aliyun
/*
* https://myip.ms/view/ip_owners/179248/Aliyun_Computing_Co_Ltd.html
res = ""; for (i=0; i<41; i++) { console.log(arr[i].text); res = res + "\n" + arr[i].text; }
arr = $("table .JColResizer .row_name a")
101.132.0.0 - 101.133.255.255
101.200.0.0 - 101.201.255.255
101.37.0.0 - 101.37.255.255
106.14.0.0 - 106.15.255.255
110.75.160.0 - 110.75.191.255
110.76.32.0 - 110.76.47.255
112.124.0.0 - 112.127.255.255
112.74.0.0 - 112.74.255.255
114.215.0.0 - 114.215.255.255
114.55.0.0 - 114.55.255.255
115.28.0.0 - 115.29.255.255
116.62.0.0 - 116.62.255.255
118.178.0.0 - 118.178.255.255
118.190.0.0 - 118.190.255.255
118.31.0.0 - 118.31.255.255
119.23.0.0 - 119.23.255.255
120.24.0.0 - 120.27.255.255
120.55.0.0 - 120.55.255.255
120.76.0.0 - 120.79.255.255
121.196.0.0 - 121.199.255.255
121.40.0.0 - 121.43.255.255
121.89.0.0 - 121.89.255.255
123.56.0.0 - 123.57.255.255
139.129.0.0 - 139.129.255.255
139.196.0.0 - 139.196.255.255
139.224.0.0 - 139.224.255.255
182.92.0.0 - 182.92.255.255
203.107.0.0 - 203.107.127.255
203.119.128.0 - 203.119.255.255
218.244.128.0 - 218.244.159.255
223.4.0.0 - 223.7.255.255
39.96.0.0 - 39.108.255.255
42.120.0.0 - 42.121.255.255
42.96.128.0 - 42.96.255.255
47.104.0.0 - 47.111.255.255
47.113.0.0 - 47.127.255.255
47.92.0.0 - 47.95.255.255
47.96.0.0 - 47.97.255.255
47.98.0.0 - 47.99.255.255
59.110.0.0 - 59.110.255.255
60.205.0.0 - 60.205.255.255
*/
ipset create ALIYUN nethash
ipset add ALIYUN 101.132.0.0/16
ipset add ALIYUN 101.200.0.0/16
ipset add ALIYUN 101.37.0.0/16
ipset add ALIYUN 106.14.0.0/16
ipset add ALIYUN 112.124.0.0/16
ipset add ALIYUN 112.74.0.0/16
ipset add ALIYUN 114.215.0.0/16
ipset add ALIYUN 114.55.0.0/16
ipset add ALIYUN 115.28.0.0/16
ipset add ALIYUN 116.62.0.0/16
ipset add ALIYUN 118.178.0.0/16
ipset add ALIYUN 118.190.0.0/16
ipset add ALIYUN 118.31.0.0/16
ipset add ALIYUN 119.23.0.0/16
ipset add ALIYUN 120.24.0.0/16
ipset add ALIYUN 120.55.0.0/16
ipset add ALIYUN 120.76.0.0/16
ipset add ALIYUN 121.196.0.0/16
ipset add ALIYUN 121.40.0.0/16
ipset add ALIYUN 121.89.0.0/16
ipset add ALIYUN 123.56.0.0/16
ipset add ALIYUN 139.129.0.0/16
ipset add ALIYUN 139.196.0.0/16
ipset add ALIYUN 139.224.0.0/16
ipset add ALIYUN 182.92.0.0/16
ipset add ALIYUN 203.107.0.0/16
ipset add ALIYUN 222.186.0.0/16
ipset add ALIYUN 223.4.0.0/16
ipset add ALIYUN 39.96.0.0/16
ipset add ALIYUN 42.120.0.0/16
ipset add ALIYUN 47.104.0.0/16
ipset add ALIYUN 47.113.0.0/16
ipset add ALIYUN 47.92.0.0/16
ipset add ALIYUN 47.96.0.0/16
ipset add ALIYUN 47.98.0.0/16
ipset add ALIYUN 59.110.0.0/16
ipset add ALIYUN 60.169.0.0/16
ipset add ALIYUN 60.205.0.0/16
iptables -A INPUT -p tcp -m set --match-set ALIYUN src -m tcp --dport 81:999 -j REJECT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment