iami233
iami233
文章120
标签35
分类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的防火墙挺不错,目前防火墙规则配置如下,如有误封,请在本页面留言

最后更新时间2022年4月15日14:50

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

屏蔽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
140.238.156.169
167.99.133.28
178.239.21.161
5.188.206.18
185.150.189.219
213.5.47.43
45.134.144.43
112.5.37.24
23.247.108.47
112.5.37.79
2408:8420:3da0:5f8:49cf:19e7:58ab:44a5
240e:468:882:2015:9887:5ce0:b3c2:60c1
211.136.253.191
182.148.5.106
202.182.112.76
113.218.129.103
101.34.170.87
171.113.20.32
103.194.185.234
59.55.155.167
156.247.9.41
182.161.38.109
2408:8420:3dd0:554:c818:c838:493f:70e0
167.99.116.148
216.118.235.146
18.193.149.176
240e:314:a29c:8a00:ed4a:fcd1:b28e:91bd
116.77.73.249
2409:8954:8864:28e6:cd23:a61:5120:862
156.247.11.114
110.229.221.92
45.32.102.35
159.223.112.146
39.108.104.53
20.85.224.59
131.255.132.254
83.138.53.128
132.145.109.31
45.61.138.112
178.239.21.162
213.5.47.43
217.165.24.22
185.191.32.210
178.239.21.102
80.82.65.247
45.134.144.42
130.61.227.230
89.248.165.207
91.211.91.104
87.251.64.187
45.146.164.160
218.19.139.32
137.175.7.5
117.44.219.180
2a02:13f0:8100:1:ad0e:df99:f1ea:d0b6
94.102.56.151
134.122.80.186
156.255.2.63
167.71.68.203
132.145.62.87
2409:8944:6640:201d:d956:ec06:7d9e:6d3c
162.33.178.15
156.247.11.1/24
62.210.188.203
14.18.100.250
130.61.227.230
2408:844d:7608:134b:1:1:fa6c:997a
92.205.27.92
117.60.2.32
130.61.233.198
45.155.205.233
120.12.206.108
195.54.160.149
114.217.21.115
119.28.189.182
27.159.92.125
81.30.157.43
19.42.149.170
223.89.116.73
173.212.233.104
101.43.118.245
196.196.150.38
140.246.171.141
218.104.71.166
167.71.175.10
180.129.129.242
45.83.65.197
45.83.65.82
46.105.95.220
125.124.82.198
139.9.76.254
185.220.100.252
221.222.26.163
36.138.125.119
122.228.208.223
27.159.92.85
223.111.134.143
89.248.160.193
175.6.210.66
216.224.121.150
120.24.23.84
27.159.66.46
139.9.190.25
185.191.34.215
103.194.186.194
138.99.216.222
103.231.174.50
27.159.92.84
27.128.174.160
23.101.132.31
45.144.113.252
45.158.22.40
175.6.82.53
45.134.144.108
103.231.174.90
64.225.23.78
178.239.21.103
128.106.139.182
92.255.85.105
86.104.10.77
24.55.159.18
43.248.130.211
112.30.131.54
45.115.243.144
89.248.163.174	
89.248.163.177
112.5.37.149
65.190.126.210
116.14.110.40
150.136.181.131
172.87.29.127
27.150.86.28
202.79.171.176
212.243.9.107
113.120.119.125
115.207.62.6
50.117.24.210
113.96.223.239
174.138.6.169
113.96.223.240
117.151.92.48
39.128.126.255
117.136.21.102
189.206.70.33
112.213.97.73
150.107.76.150
58.69.82.84
23.27.76.147
27.150.181.196
154.86.128.221
193.218.118.231
114.236.107.162
187.189.153.219
113.120.37.65
121.233.9.99
185.23.108.23
139.5.177.59
43.132.182.113
103.100.208.119
49.232.201.73
20.124.233.161
222.186.43.126
45.201.198.232
172.105.87.91
98.0.242.10
81.171.9.199
110.240.89.236
178.239.21.16
81.171.9.209
173.255.132.116
113.124.222.150
45.195.52.91
2.56.59.95
178.239.21.104
45.156.84.170
5.188.159.169
103.194.184.42
173.248.241.36
141.164.55.217
45.136.12.217
138.199.55.45
137.116.138.73
194.76.225.97
45.134.144.140
112.5.37.142
45.136.12.208
45.134.144.144
221.228.87.37
101.72.183.9
185.83.144.103
45.134.144.141
138.99.216.224	
45.134.144.143
39.144.197.164
167.179.48.56
112.47.58.180
112.5.37.192
180.215.150.13	
185.232.52.44
157.245.222.40
185.232.52.38
94.158.80.118
175.178.84.120
216.83.53.42
2002:d853:352a::d853:352a
193.201.8.107
45.120.54.132
38.55.216.222
154.222.228.118
20.127.112.167
179.60.147.11
78.128.113.170
86.106.121.113
142.132.155.16
37.0.8.124
218.2.216.28
45.134.144.155
218.2.216.5
154.6.18.75
182.255.63.157
185.135.73.13
43.248.96.187
47.89.17.189
106.75.28.105
149.56.234.155
136.243.58.229
112.47.61.147
91.191.209.190
141.144.232.84
1.192.56.225
222.186.48.108
45.135.232.80
60.205.179.10
38.55.216.0/24
154.222.232.76
51.103.179.197
216.83.52.14
45.55.52.204
139.60.160.162
45.134.144.159
124.248.67.49
43.250.200.125
103.42.178.235
139.28.235.104
26.190.149.249
12.227.226.96
162.20.200.157
57.254.127.147
20.205.168.121
222.186.43.119
88.214.43.118
31.222.174.143
43.129.74.19
171.217.251.81
44.201.175.121
本文作者:iami233
本文链接:https://5ime.cn/apifirewall.html
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可