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

关于Ten·API防火墙的配置

最近API请求数激增,每天以20w的次数递增,目前已经到了160w…原本打算开发一个管理系统,限制用户调用数,但是计划赶不上变化。

(服务器只是1h1g的小鸡,撑不住了日常负载和CPU占用100%) 如果你愿意赞助请前往:投食 I Am I

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

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
最后更新时间2023年01月19日20:45

屏蔽用户代理:
// 屏蔽的都是不常见的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:
// 大部分为脚本小子
// 小部分为频繁请求
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
106.55.161.163
192.151.197.146
103.60.150.10
1.13.16.151
92.205.59.185
203.135.98.51
103.54.124.242
116.63.137.251
54.151.189.202
192.161.161.105
192.151.197.147
47.106.157.11
103.194.184.18
106.75.216.101
216.83.58.97
124.220.163.140
43.248.133.64
45.207.39.102
2408:845c:b900:4eba:79a9:45a4:ca35:f0f6
222.79.61.224
45.207.39.117
203.86.233.200
45.207.39.110
45.207.39.99
203.135.98.102
182.255.63.28
110.40.206.239
45.80.191.58
45.80.191.43
154.222.238.34
20.94.248.189
202.95.13.52
154.222.238.32
143.92.48.2
193.134.208.51
116.225.32.35
154.83.113.10
2a06:98c0:3600::103
134.195.208.171
159.89.190.118
154.204.41.60
45.207.37.24
64.140.131.246
192.64.113.244
185.175.156.40
92.38.133.82
170.130.165.192
172.104.159.48
45.134.144.53
185.162.235.175
179.60.147.21
170.130.55.178
194.165.17.12
1.81.129.47
36.134.86.152
121.140.205.106
154.39.238.150
185.135.73.12
43.138.41.187
118.117.189.88
111.224.144.59
111.225.152.143
111.224.144.196
117.94.223.168
223.198.253.35
223.198.252.122
117.69.24.204
49.70.154.70
58.243.139.172
110.89.122.207
58.243.143.84
103.194.185.162
182.16.17.234
112.213.121.83
111.90.147.124
101.99.93.115
112.213.116.26
52.128.229.50
216.118.226.178
112.206.107.228
117.50.111.6
52.128.229.50
118.107.45.5
223.73.10.85
122.55.53.206
47.98.44.126
185.135.73.232
45.137.20.41
103.106.247.100
20.125.134.75
45.133.193.89
139.5.200.26
116.213.36.10
1.13.18.208
116.213.36.226
121.140.205.137
209.141.55.115
139.162.49.49
112.213.121.41
13.53.194.237
5.45.96.177
185.220.100.243
45.79.93.245
104.244.79.9
138.201.62.183
103.40.113.229
161.35.236.140
193.32.126.152
152.1.66.151
89.248.165.178
92.255.85.38
185.36.81.95
170.130.165.221
92.255.85.112
42.194.241.189
45.72.110.145
193.201.9.69
164.138.103.215
216.131.114.49
185.147.212.114
217.182.199.126
216.131.114.102
37.120.144.231
20.84.241.142
185.174.159.20
216.151.180.100
103.209.253.10
45.134.144.200
147.135.36.162
185.162.235.162
51.12.50.173
148.251.23.205
23.248.234.34
65.109.4.0
177.44.68.201
154.222.233.247
65.108.56.83
20.248.160.226
121.4.175.232
124.221.195.146
149.28.141.153
1.85.2.113
51.104.214.135
103.45.104.28
14.36.38.179
20.163.0.79
156.242.11.11
192.161.55.94
195.178.120.89
117.50.158.8
27.50.59.146
116.213.38.98
122.114.206.219
109.206.247.174
51.144.107.251
20.111.11.121
152.89.196.23
45.134.144.72
151.106.38.211
5.39.220.78
92.204.144.160
34.65.113.188
170.130.165.196
146.0.77.38
45.9.149.162
165.227.186.85
103.214.175.105
154.94.88.118
156.225.137.6
112.213.103.8
94.232.43.93
14.36.39.2
148.66.50.90
209.141.57.123
194.41.59.2
178.138.35.51
154.55.133.196
104.200.20.186
194.195.115.113
123.180.68.37
123.180.69.240
154.39.240.7
121.62.22.165
203.90.245.37
199.188.105.4
185.242.232.148
45.207.37.34
103.39.79.87
154.39.241.10
153.37.8.181
153.37.9.191
178.138.34.239
21.59.103.81
71.243.162.55
33.55.197.56
42.33.145.10
139.178.232.144
219.75.152.80
213.96.25.211
249.101.204.142
232.238.95.252
179.16.208.119
202.169.122.250
99.178.249.76
252.248.123.85
93.79.141.235
34.204.220.115
49.91.80.242
110.192.72.24
244.230.118.143
64.20.63.58
43.132.168.69
174.139.101.75
178.138.35.157
211.219.149.222
103.21.208.170
20.110.232.0
101.36.173.168
2400:6180:0:d0::648:d001
2001:19f0:5c01:fcb:5400:4ff:fe2b:73c3
112.114.107.84
103.158.161.36
103.186.214.63
119.4.172.126
20.247.53.148
43.248.134.102
154.22.122.129
34.122.239.121
103.55.25.65
154.22.121.152
154.31.2.160
27.11.100.183
183.192.179.16
223.167.152.63
34.226.233.168
223.167.152.126
136.243.17.161
4.227.209.140
120.89.69.82
195.246.120.115
27.124.37.119
14.36.39.167
107.167.39.250
222.186.52.149
112.114.103.25
47.97.172.131
43.248.134.99
121.27.126.29
121.27.126.28
120.14.172.41
120.14.172.10
121.27.126.70
120.14.172.11
121.27.126.217
121.27.126.187
122.10.15.24
103.100.62.171
180.130.255.131
156.247.11.124
223.167.152.13
223.166.151.57
223.167.152.77
61.151.178.236
223.166.151.236
61.151.207.141
61.151.207.205
43.228.126.49
49.234.76.21
180.190.85.95
122.51.65.225
112.114.102.79
45.33.65.249
185.7.214.218
154.204.25.42
27.11.211.128
61.151.178.225
61.151.178.172
101.91.80.177
112.121.166.10
164.92.143.142
165.227.232.121
185.3.94.247
114.91.29.133
114.91.7.102
181.214.206.91
103.149.90.250
44.192.29.189
208.102.116.171
111.252.206.66
134.122.183.170
65.109.131.178
112.196.204.27
61.75.17.143
35.182.107.115
103.149.90.99
122.10.98.132
103.79.25.143
52.5.104.159
222.65.107.16
67.198.131.104
223.166.151.237
223.167.152.57
123.144.36.105
223.166.151.235
223.167.152.54
223.167.152.72
143.92.34.161
211.92.80.145
45.207.45.246
120.241.179.27
203.86.238.174
59.36.132.91
8.142.87.162
92.192.33.207
132.95.50.176
41.184.55.157
228.86.166.134
137.212.87.8
65.170.86.178
156.101.198.58
47.92.30.57
47.92.78.126
8.142.104.65
122.9.9.175
122.9.38.107
43.143.117.130
43.143.0.198
34.131.159.20
103.225.197.97
107.189.31.198
142.44.193.80
104.248.151.199
139.99.62.224
34.125.110.69
23.229.8.101
180.101.52.69
223.166.151.233
134.122.134.49
60.216.13.14
223.73.25.138
45.33.108.149
45.134.144.119
138.99.216.218
216.118.234.34
117.50.190.5
5.78.51.217
165.22.184.15
178.128.166.225
103.148.244.250
180.101.52.0/24
150.109.53.38
2408:826c:7d14:6030:1d9c:a763:4395:420f
2600:1f16:983:cb00:2020:c6d3:673a:2fe3
159.223.102.149
164.92.135.200
113.246.94.23
105.155.34.38
45.207.52.201
101.33.236.34
223.74.88.119
81.19.135.24
124.221.119.226
147.182.144.10
172.86.75.166
72.251.235.148
185.3.94.183
165.227.238.25
14.116.239.32
98.142.241.70
172.104.249.218
45.12.253.177
54.164.138.232
本文作者:iami233
本文链接:https://5ime.cn/apifirewall.html
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可