iami233
iami233
文章113
标签102
分类4
关于Ten·API防火墙的配置

关于Ten·API防火墙的配置

最近API请求数激增,每天以20w的次数递增,目前已经到了160w…原本打算开发一个管理系统,限制用户调用数,但是计划赶不上变化。(服务器只是1h1g的小鸡,撑不住了日常负载和CPU占用100%)如果你愿意赞助请前往:https://5ime.cn/about/#%E6%8A%95%E9%A3%9F-I-Am-I

现在全站已经迁移到Cloudflare,薅一波资本主义羊毛,但是迁移过去之后服务器直接502(很奇怪),排查了一下,为避免其他用户受影响,现决定开启防火墙。

不得不说cf的防火墙挺不错,目前防火墙规则配置如下,如有误封,请在本页面留言

最后更新时间2021年10月18日08:00

屏蔽用户代理:
// 屏蔽的都是不常见的UA,且大批量请求!
包含:Dalvik/2.1.0
包含:Apache-HttpClient
包含:Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)

屏蔽IP:
// 通过IPIP查询判定为代理,且大批量请求!
218.206.154.3
61.140.87.45
218.19.214.214
119.85.107.0/24

// 傻逼脚本小子
103.159.64.202
113.81.101.222
81.71.101.188
139.224.11.234
209.126.151.0/24
164.68.102.233
41.77.245.76
20.80.20.97
45.132.238.138
31.171.154.135
194.9.70.148
218.5.41.208
161.35.86.181
103.44.20.186
222.77.111.174
167.71.13.196
193.107.216.227
112.13.96.187
34.226.66.3
45.82.79.15
45.95.147.15
23.224.121.37
193.93.195.179
58.251.121.184
124.160.214.143
134.122.112.12
143.244.41.194
110.86.174.79
45.146.164.37
2404:8c80:0:1001:152:4ae8:5d4e:b9d1
52.188.162.137
194.48.199.121
107.150.108.50
194.48.199.78
45.143.200.54
129.213.134.20
130.61.112.134
148.66.31.138
45.141.84.35
106.53.124.110
103.148.58.148
223.90.4.218
156.251.136.4
180.215.5.133
101.36.172.194
119.29.119.174
178.18.241.45
193.122.157.228
185.202.1.30
193.135.12.33
130.61.131.151
119.90.52.42
132.145.60.63
112.213.97.64
39.68.85.107
171.221.151.93
103.249.106.49
222.186.133.9
111.6.78.243
185.53.89.191
101.80.66.66
2a02:13f0:8100:1:a1f9:d429:94eb:566
154.202.60.47
118.107.44.197
103.206.21.107
171.35.167.36
2002:766b:2cc5::766b:2cc5
156.247.10.42
103.45.158.148
103.146.124.72
132.145.98.193
91.132.58.0/24
45.227.254.31
91.191.209.164
116.202.8.57
118.195.194.32
45.207.55.54
176.113.71.6
125.88.153.227
106.14.208.14
49.234.24.125
47.113.220.205
180.97.118.207
222.186.160.185
45.9.20.78
161.35.188.242
132.145.155.245
45.227.254.6
194.165.16.88
197.248.146.186
91.132.58.62
130.61.178.230
122.114.65.78
59.52.178.202
172.87.27.129
157.245.149.125
43.129.196.60
42.228.160.101
216.224.120.188
113.245.61.25
216.224.120.204
139.9.205.81
216.224.120.205
240e:454:594:78d:cd2e:4fa9:c701:1ff4
240e:398:b3c1:7410:bdf4:abc3:e56e:9ce0
39.109.115.60
106.55.202.118
125.39.132.125
120.70.48.226
172.87.27.130
23.247.108.44
113.96.223.69
58.253.155.242
206.189.49.59
183.221.76.132
39.155.215.213
116.29.247.197
150.109.198.209
141.98.9.21
135.181.165.30
193.56.146.22
91.132.58.81
156.96.47.131
143.198.136.88
193.107.216.49
132.145.52.245
5.188.86.100
45.227.253.141
193.242.145.112
140.238.88.136
130.61.39.91
106.55.57.30
45.134.144.8
185.191.32.158
178.239.21.101
91.132.58.79
本文作者:iami233
本文链接:https://5ime.cn/apifirewall.html
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可