# 0.0.0.0

**0.0.0.0** 是一个保留的 IPv4 地址，意为“本网络上的本主机”：它标识的是本地机器或本地网络，而非任何特定的远程目的地。整个 0.0.0.0/8 地址块保留用于自我标识，而单一地址 0.0.0.0/32 则是主机在得知自身 IP 地址之前用作源地址的形式。<sup>[1](https://www.iana.org/assignments/iana-ipv4-special-registry)</sup> 在实践中，该地址还用作服务器套接字的通配绑定地址、默认路由 0.0.0.0/0，以及 DNS 黑名单中常见的空答案；自 2024 年起，它成为一项名为“0.0.0.0 Day”的浏览器安全工作的主题。<sup>[2](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)</sup>

| 关键事实 | 详情 |
|---|---|
| 注册表条目 | 0.0.0.0/8“本网络”（RFC 791 第 3.2 节）与 0.0.0.0/32“本网络上的本主机”（RFC 1122 第 3.2.1.3 节），两者均分配于 1981 年 9 月<sup>[1](https://www.iana.org/assignments/iana-ipv4-special-registry)</sup> |
| 注册表属性 | 源地址为真；目的地址、可转发、全球可达均为假；协议保留为真<sup>[1](https://www.iana.org/assignments/iana-ipv4-special-registry)</sup> |
| 核心规则 | {0, 0}“不得发送，除非作为源地址，用于主机获知自身 IP 地址的初始化过程”<sup>[3](https://datatracker.ietf.org/doc/html/rfc1122)</sup> |
| IANA 状态 | 0.0.0.0 – 0.255.255.255，组织为“IANA - 本地标识”，状态为保留<sup>[4](https://www.iana.org/whois?q=0.0.0.0)</sup> |
| 路由用途 | 前缀 0.0.0.0/0 为默认路由，所有实现都必须接受<sup>[5](https://www.rfc-editor.org/info/rfc4632/)</sup> |
| 套接字用途 | 将监听套接字绑定到 INADDR_ANY（0.0.0.0）可接受所有本地接口上的连接<sup>[6](https://www.man7.org/linux/man-pages/man7/socket.7.html)</sup> |
| 浏览器安全 | Chrome 自 Chromium 128 起开始拦截发往 0.0.0.0 的请求，至 Chrome 133 完成全面部署<sup>[2](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)</sup> |

## 注册表状态与协议规则

[互联网号码分配局](https://www.edgepedia.org/zh/internet-assigned-numbers-authority)（IANA）在其 IPv4 特殊用途地址注册表中记录 0.0.0.0/8，名称为“本网络”，引用 RFC 791；并记录 0.0.0.0/32，名称为“本网络上的本主机”，引用 RFC 1122 第 3.2.1.3 节；两条记录的分配日期均为 1981 年 9 月。<sup>[1](https://www.iana.org/assignments/iana-ipv4-special-registry)</sup> 注册表的布尔属性描述了使用这些地址的数据包可以如何处理：该地址块中的地址可作为源地址使用，但不可作为目的地址，不可在外部接口之间转发，也不具备全球可达性；该地址块由 IP 协议本身保留。<sup>[1](https://www.iana.org/assignments/iana-ipv4-special-registry)</sup> RFC 6890 是重构特殊用途注册表的最佳现行实践，它以 0.0.0.0/8 作为保留用于表示本地（“本”）网络的地址块示例。<sup>[7](https://www.rfc-editor.org/info/rfc6890/)</sup>

RFC 1122 以 { 0, 0 } 的记法定义该地址，意为网络号 0 与主机号 0，并将其标记为“本网络上的本主机”。除在主机获知自身 IP 地址的初始化过程中作为源地址外，不得发送该地址。<sup>[3](https://datatracker.ietf.org/doc/html/rfc1122)</sup> 配套形式 { 0, <主机号> } 表示本网络上的指定主机，受同样的限制。<sup>[3](https://datatracker.ietf.org/doc/html/rfc1122)</sup> RFC 3330 重述了这一区分：0.0.0.0/32 可作为本网络上的本主机的源地址使用，而 0.0.0.0/8 内的其他地址可用于指代本网络上的指定主机。<sup>[8](https://www.rfc-editor.org/rfc/pdfrfc/rfc3330.txt.pdf)</sup> 收到的数据包若以 0.0.0.0 为源地址且用途并非引导，应静默丢弃并记录日志。<sup>[9](https://www.ietf.org/ietf-ftp/rfc/rfc6274.txt.pdf)</sup>

## 实际用途

**地址获取。** 初始化源地址角色是经典用法：尚不知自身地址的主机以 0.0.0.0 为源地址发送协议消息。BOOTP 中继代理将源地址 0.0.0.0（网络 0 上的任何地址）视为尚未分配地址的客户端的标志。<sup>[10](https://www.rfc-editor.org/rfc/pdfrfc/rfc1532.txt.pdf)</sup> 后来一份关于 0/8 地址块单播使用的互联网草案指出，0/8 作为保留空间的指定由 IANA 在 RFC 6890 所规定的 IPv4 特殊用途地址注册表中跟踪。<sup>[11](https://datatracker.ietf.org/doc/html/draft-schoen-intarea-unicast-0-06)</sup>

**路由。** 在路由表中，退化前缀 0.0.0.0/0 匹配所有目的地，用作默认路由；RFC 4632 要求所有实现接受它，并警告只有在路由器被显式配置为执行此操作时，才应在路由域之间通告该前缀。<sup>[5](https://www.rfc-editor.org/info/rfc4632/)</sup>

**服务器套接字。** 在伯克利套接字 API 中，将服务器绑定到 INADDR_ANY（写作 0.0.0.0）即告诉操作系统接受到达任何本地接口的连接。在 Linux 上，当监听套接字以特定端口绑定到 INADDR_ANY 时，其他任何套接字都无法再在任何本地地址上绑定该端口。<sup>[6](https://www.man7.org/linux/man-pages/man7/socket.7.html)</sup> 这就是开发服务器通常以 0.0.0.0 作为主机参数启动的原因。

**DNS 黑名单。** 过滤解析器通常以 0.0.0.0 而非可见的重定向地址来应答被拦截的域名。例如，NextDNS 在拦截 DNS-over-HTTPS 请求且其 DNS 重绑定（攻击者将网站主机名重新指向内部 IP 地址）防护启用时，会返回“UNSPECIFIED_ADDRESS”（0.0.0.0）。<sup>[12](https://www.nccgroup.com/research/impact-of-dns-over-https-doh-on-dns-rebinding-attacks/)</sup>

## IPv6 中的对应物

IPv6 有一个类似地址：0:0:0:0:0:0:0:0（也写作 ::）称为未指定地址。它绝不可分配给任何节点，表示地址缺失，用于初始化中的主机在获知自身地址之前所发数据包的源地址字段；它不得用作目的地址或用于路由头，源地址为未指定地址的数据包绝不得由路由器转发。<sup>[13](https://www.rfc-editor.org/rfc/rfc3513.html)</sup>

## 安全：“0.0.0.0 Day”与浏览器应对

2024 年 8 月，Oligo Security 的研究人员披露了一个名为“0.0.0.0 Day”的漏洞：公共网站可以通过将请求寻址到 0.0.0.0 而非 127.0.0.1，与 macOS 和 Linux 上 localhost 运行的软件通信，并有可能加以利用。Windows 未受影响，因为它在系统层面拦截了该地址。<sup>[2](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)</sup> 根本问题在于各浏览器对本地网络请求的处理不一致：Chrome 的私有网络访问（PNA）机制会阻止公共网站访问 127.0.0.1、localhost 和私有 IP，但 0.0.0.0 地址可以绕过它。<sup>[2](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)</sup>

同样的缺口此前已在 DNS 重绑定的语境中被记录。NCC Group 表明，返回 0.0.0.0 的重绑定攻击可在约 3 秒内通过 Chrome 访问 Linux 和 macOS 上的 localhost 服务，并于 2022 年 2 月就该绕过问题提交了 [Chromium](https://www.edgepedia.org/zh/chromium-web-browser) 错误报告。<sup>[14](https://www.nccgroup.com/research/state-of-dns-rebinding-in-2023/)</sup>

**浏览器与平台缓解措施。** 在 PNA 全面部署之前，Chrome 已弃用从公共网站直接访问 0.0.0.0，自 Chromium 128 起拦截该地址，至 Chrome 133 完成部署。<sup>[2](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)</sup> Chrome 还将 0.0.0.0/8 加入私有网络访问规范，使不安全上下文被限制访问该地址块，此后 PNA 执行时将 0.0.0.0 视为本地地址；PNA 预检执行本身因兼容性问题被搁置。<sup>[15](https://developer.chrome.com/blog/pna-on-hold?authuser=112)</sup> Chrome 的后续工作“本地网络访问”要求发往本地网络和环回目的地的请求先通过权限提示获得用户授权，于 Chrome 142 推出。<sup>[16](https://developer.chrome.com/blog/local-network-access)</sup> Firefox 拦截了导航和抓取中对 0.0.0.0 的请求（Mozilla 缺陷 1889130），并另行将地址栏中输入或链接的 0.0.0.0 重写为 127.0.0.1，以便 http://0.0.0.0:8080 之类的开发者链接继续可用；该重写改变的是实际目的地，而非仅改变显示内容，因此底层请求发往 127.0.0.1。<sup>[17](https://bugzilla.mozilla.org/show_bug.cgi?id=1952955)</sup>

这种歧义也出现在浏览器之外。一份 axios 安全公告描述了其代理绕过逻辑在评估 NO_PROXY 规则时未将 0.0.0.0 视为本地地址，因为 Node 的 WHATWG URL 解析器不会将 0.0.0.0 规范化为 127.0.0.1。<sup>[18](https://github.com/axios/axios/security/advisories/GHSA-f4gw-2p7v-4548)</sup> 服务端请求伪造（SSRF）防护库同样必须显式拦截未指定地址以及环回和私有地址范围，因为在 Linux 上连接到 0.0.0.0 可以触及绑定到环回或通配接口的服务。<sup>[19](https://github.com/ihor-sokoliuk/mcp-searxng/issues/82)</sup>

## References

1. [IANA IPv4 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv4-special-registry)
2. [0.0.0.0 Day: Exploiting Localhost APIs From the Browser, Oligo Security (August 2024)](https://www.oligo.security/blog/0-0-0-0-day-exploiting-localhost-apis-from-the-browser)
3. [RFC 1122: Requirements for Internet Hosts - Communication Layers](https://datatracker.ietf.org/doc/html/rfc1122)
4. [IANA WHOIS Service query for 0.0.0.0](https://www.iana.org/whois?q=0.0.0.0)
5. [RFC 4632: Classless Inter-domain Routing (CIDR)](https://www.rfc-editor.org/info/rfc4632/)
6. [socket(7), Linux manual page](https://www.man7.org/linux/man-pages/man7/socket.7.html)
7. [RFC 6890: Special-Purpose IP Address Registries (BCP 153)](https://www.rfc-editor.org/info/rfc6890/)
8. [RFC 3330: Special-Use IPv4 Addresses](https://www.rfc-editor.org/rfc/pdfrfc/rfc3330.txt.pdf)
9. [RFC 6274: Security Assessment of the Internet Protocol](https://www.ietf.org/ietf-ftp/rfc/rfc6274.txt.pdf)
10. [RFC 1532: Clarifications and Extensions for BOOTP](https://www.rfc-editor.org/rfc/pdfrfc/rfc1532.txt.pdf)
11. [draft-schoen-intarea-unicast-0-06](https://datatracker.ietf.org/doc/html/draft-schoen-intarea-unicast-0-06)
12. [Impact of DNS-over-HTTPS (DoH) on DNS Rebinding Attacks, NCC Group](https://www.nccgroup.com/research/impact-of-dns-over-https-doh-on-dns-rebinding-attacks/)
13. [RFC 3513: Internet Protocol Version 6 (IPv6) Addressing Architecture](https://www.rfc-editor.org/rfc/rfc3513.html)
14. [DNS Rebinding: 2023 Threats & Defenses, NCC Group](https://www.nccgroup.com/research/state-of-dns-rebinding-in-2023/)
15. [Private Network Access on hold, Chrome for Developers (October 2024)](https://developer.chrome.com/blog/pna-on-hold?authuser=112)
16. [New permission prompt for Local Network Access, Chrome for Developers (June 2025)](https://developer.chrome.com/blog/local-network-access)
17. [Mozilla Bug 1952955: Address bar displays 127.0.0.1 when following links to 0.0.0.0](https://bugzilla.mozilla.org/show_bug.cgi?id=1952955)
18. [Axios security advisory GHSA-f4gw-2p7v-4548: NO_PROXY bypass for 0.0.0.0](https://github.com/axios/axios/security/advisories/GHSA-f4gw-2p7v-4548)
19. [mcp-searxng issue 82: additional SSRF bypasses including 0.0.0.0](https://github.com/ihor-sokoliuk/mcp-searxng/issues/82)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › IP addressing, subnets, and allocation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/0-0-0-0

English original: https://www.edgepedia.org/0-0-0-0
