0.0.0.0
{{pp|small=yes}}
{{Short description|Technically invalid IP address}}
{{Use dmy dates|date=June 2023}}
The Internet Protocol Version 4 (IPv4) address {{IPaddr|0.0.0.0}} can have multiple uses.
Uses
= Official meaning and use =
IANA, who allocate IP addresses globally, have allocated the single IP address {{IPaddr|0.0.0.0}}{{Cite web |date=2009-08-19 |title=IANA IPv4 Special-Purpose Address Registry |url=https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml |access-date=2023-06-07 |website=Internet Assigned Numbers Authority}} to {{IETF RFC|1122}} section 3.2.1.3. It is named as "This host on this network".
RFC 1122 refers to {{IPaddr|0.0.0.0}} using the notation {0,0}. It prohibits this as a destination address in IPv4 and only allows it as a source address under specific circumstances.
A host may use {{IPaddr|0.0.0.0}} as its own source address in IP when it has not yet been assigned an address, such as when sending the initial DHCPDISCOVER packet when using DHCP.
= Operating system specific uses =
Some operating systems have attributed special internal meanings to the address. These uses do not result in IPv4 packets containing {{IPaddr|0.0.0.0}} and so are not governed by RFC 1122.{{Cite web |last=Kitt |first=Stephen |date=Jan 26, 2018 |title=Connecting to IP 0.0.0.0 succeeds. How? Why? |url=https://unix.stackexchange.com/a/419881/20140 |access-date=2023-06-07 |website=Stack Exchange}} These meanings may not be consistent between operating systems.
In both Windows and Linux, when selecting which of a host's IP address to use as a source IP, a program may specify INADDR_ANY ({{IPaddr|0.0.0.0}}).{{cite web |last=Kerrisk |first=Michael |date=2021-03-22 |title=ip(7) — Linux manual page |url=https://man7.org/linux/man-pages/man7/ip.7.html |access-date=2023-06-07 |website=man7.org}}{{cite web |date=2022-08-19 |title=bind function (winsock.h) - Win32 apps |url=https://learn.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-bind |access-date=2023-06-07 |website=Microsoft Learn}}
In Linux a program may specify {{IPaddr|0.0.0.0}} as the remote address to connect to the current host (AKA localhost).
= Other non-standard uses =
Besides the use by operating systems internally, other uses have been attributed to the address.{{cite web |author=Postill |first=David |date=2 August 2015 |title=What's the difference between 127.0.0.1 and 0.0.0.0? |url=https://superuser.com/a/949522 |access-date=2023-06-07 |website=Stack Exchange}}{{cite web |author=Mitchell |first=Bradley |date=16 December 2018 |title=What It Means When You See the 0.0.0.0 IP Address |url=https://www.lifewire.com/four-zero-ip-address-818384 |access-date=2023-06-07 |website=Lifewire}}
- A non-routable meta-address used to designate an invalid, unknown or non applicable target
- The address a host assigns to itself when address request via DHCP has failed, provided the host's IP stack supports this. This usage has been replaced with the APIPA mechanism in modern operating systems.
- A way to explicitly specify that the target is unavailable.{{Ref RFC|4639|p=32|ref=no|quote=If 0.0.0.0, either syslog transmission is inhibited, or the Syslog server address is not an IPv4 address.}}
- A way to route a request to a nonexistent target instead of the original target. Often used for adblocking purposes. This can conflict with OS specific behaviour.{{Cite web |last=Kitt |first=Stephen |date=Nov 19, 2022 |title=Why accessing 0.0.0.0:443 gets redirected to 127.0.0.1:443 on Linux and how to disallow it? |url=https://unix.stackexchange.com/a/725542 |access-date=2023-06-07 |website=Stack Exchange}}
= Routing =
In routing tables, {{IPaddr|0.0.0.0}} can also appear in the gateway column. This indicates that the gateway to reach the corresponding destination subnet is unspecified. This generally means that no intermediate routing hops are necessary because the system is directly connected to the destination.{{cite web |last=Henry-Stocker |first=Sandra |date=2013-08-04 |title=Unix: Getting from here to there (routing basics) |url=https://www.networkworld.com/article/2707620/unix---getting-from-here-to-there--routing-basics-.html |archive-date= |access-date=2023-06-07 |website=Network World}}
The CIDR notation {{IPaddr|0.0.0.0|0}} defines an IP block containing all possible IP addresses. It is commonly used in routing to depict the default route as a destination subnet. It matches all addresses in the IPv4 address space and is present on most hosts, directed towards a local router.{{Cite book |last=Abraham |first=Tim |title=Metabase Up and Running Introduce Business Intelligence and Analytics to Your Company and Make Better Business Decisions |year=2020 |edition=1st}}
= In IPv6 =
In IPv6, the all-zeros address is typically represented by {{IPaddr|::}} (two colons), which is the short notation of {{IPaddr|0000:0000:0000:0000:0000:0000:0000:0000}}.{{cite web |last=Das |first=Kaushik |year=2008 |title=IPv6 Addressing |url=http://ipv6.com/articles/general/IPv6-Addressing.htm |url-status=dead |archive-url=https://web.archive.org/web/20150411122120/http://ipv6.com/articles/general/IPv6-Addressing.htm |archive-date=2015-04-11 |access-date=2023-06-07 |website=ipv6.com}} The IPv6 variant serves the same purpose as its IPv4 counterpart.
0.0.0.0 day exploit
In August 2024, researchers from Israeli cybersecurity firm Oligo announced that they had discovered a security flaw was being exploited, in which malicious requests from a target's web browser were allowed to reach any port of the {{IPaddr|0.0.0.0}} address of their target, allowing the browser (and therefore the remote attacker) to access private resources. Depending on what software is configured to be listening, the attackers could exfiltrate internal company information or developer code, or issue any requests to the software's APIs.{{Cite news |title=Hackers Have Exploited An 18-Year-Old '0.0.0.0-Day' Loophole In Safari, Chrome And Firefox |url=https://www.forbes.com/sites/thomasbrewster/2024/08/07/hackers-exploit-18-year-old-vulnerability-in-apple-google-and-mozilla-browsers/ |last=Brewster |first=Thomas |date=2024-08-07 |access-date=2024-08-08 |work=Forbes}}{{cite news |last1=Lyons |first1=Jessica |title=It's 2024 and we're just getting round to stopping browsers insecurely accessing 0.0.0.0 |url=https://www.theregister.com/2024/08/09/0000_day_bug/ |access-date=25 May 2025 |work=The Register |date=9 August 2024}}
See also
References
{{Reflist}}