# IP前缀阻止列表

**URL:** <https://meta.discourse.org/t/block-list-of-ip-prefixes/255037>\
**Category:** Support\
**Created:** [2023年二月13日 20:58 UTC](https://meta.discourse.org/t/block-list-of-ip-prefixes/255037 "2023-02-13T20:58:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![codergautam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codergautam/32/261083_2.png) [@codergautam](https://meta.discourse.org/u/codergautam)\
**Post date:** [2023年二月13日 20:58 UTC](https://meta.discourse.org/t/block-list-of-ip-prefixes/255037/1 "2023-02-13T20:58:59Z")

</div>

我需要在我网站上屏蔽一系列 IP 地址前缀：  
这是其中的一小部分：

```plaintext
34.80.0.0/15
34.137.0.0/16
35.185.128.0/19
35.185.160.0/20
35.187.144.0/20
35.189.160.0/19
35.194.128.0/17
35.201.128.0/17
35.206.192.0/18
35.220.32.0/21
35.221.128.0/17
34.125.0.0/16
35.219.128.0/18
2600:1900:4180::/44

```

我查看了 `/admin/logs/screened_ip_addresses`，但似乎没有批量添加 IP 地址前缀的方法。

有什么方法可以做到这一点吗？

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2023年二月13日 22:06 UTC](https://meta.discourse.org/t/block-list-of-ip-prefixes/255037/2 "2023-02-13T22:06:47Z")

</div>

一般而言：这类阻止应该通过 iptables 来完成，而不是让它们首先到达应用程序。这是一项相当简单的工作。

但该死的 Docker 让一切都变得如此困难。据我所知，Docker 会绕过 iptables，这就是为什么我们在服务器级别做什么都无关紧要的原因。但是 `./launcher enter app` 然后 iptables 的魔力是否会起作用？
