0.0.0.0 doesn't point at a machine at all — that's the whole trick of it. It's IPv4's "unspecified" placeholder, and what it actually means shifts depending on where you spot it: "this machine, before it even has an address" during boot-up, "every interface on this box" when a server starts listening, or "literally anywhere" inside a route or firewall rule written as 0.0.0.0/0.
The same four zeros turn up in routing tables, server logs, DHCP captures, hosts files, Docker configs — practically everywhere — which tempts people into assuming it's always the same meaning. It isn't. Below, each context in turn: what it means there, and which ones are actually worth a second look.
0.0.0.0 at a glance
| Where you see it | What it means |
|---|---|
| Source address of a packet | "This host", used only while a device has no address yet (for example during DHCP) |
| Address a server is listening on | All IPv4 interfaces on the machine (INADDR_ANY) |
Routing table: 0.0.0.0/0 or destination 0.0.0.0 with mask 0.0.0.0 | The default route: every destination not matched by a more specific route |
Firewall or cloud security rule: 0.0.0.0/0 | Any IPv4 address on the internet |
| Hosts file or DNS blocklist answer | A deliberately unusable destination, used to block a domain |
| Your own IP or gateway shown as 0.0.0.0 | The interface has no valid configuration |
The standard meaning: "this host on this network"
Go back to RFC 1122 — the 1989 standard laying out what internet hosts are required to do — and you'll find all-zeros officially defined as "this host on this network." There's a hard rule attached: it's allowed only as a source address, only while a host hasn't yet learned its real IP, and it must never show up as a destination. IANA's special-purpose registry (RFC 6890) extends that to the whole 0.0.0.0/8 block for the same reason — none of it is routable on the public internet.
Not sure how a given address is classified? Our IP address type checker will tell you — it reports 0.0.0.0 as unspecified / "this network," never public or private.
0.0.0.0 in DHCP
Where you'll actually run into the "this host" meaning in real life is a device joining a network for the first time. It simply has no address to put in its packets yet, so the opening move of DHCP looks exactly like this in a packet capture:
0.0.0.0:68 -> 255.255.255.255:67 DHCP Discover (client MAC a4:83:e7:ab:cd:ef)
192.168.1.1:67 -> 192.168.1.57:68 DHCP Offer
0.0.0.0:68 -> 255.255.255.255:67 DHCP Request
192.168.1.1:67 -> 192.168.1.57:68 DHCP ACK
The client keeps sending from 0.0.0.0 to the broadcast address right up until the server's ACK confirms a lease. So if you spot 0.0.0.0 as a source while capturing packets on your own LAN — don't panic, that's exactly what's supposed to happen.
What's not normal is your own interface still showing 0.0.0.0 as its IP or gateway well after boot — that means DHCP never finished. Usually it's something mundane: a cable that came loose, a Wi-Fi handshake that failed, or a router whose DHCP server is switched off or has simply run out of addresses to hand out. Windows sometimes shows a 169.254.x.x self-assigned address instead, for the exact same underlying failure.
Listening on 0.0.0.0: all interfaces
Every server socket has to pick a local address to listen on. Bind to 0.0.0.0 — INADDR_ANY in sockets-API terms — and you're saying "accept connections on every IPv4 address this machine owns": loopback, Ethernet, Wi-Fi, any VPN interface, all of it. Bind to 127.0.0.1 instead and only the machine itself gets through (more on that in what is localhost).
A listening-socket list makes the difference obvious. On Linux:
$ ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 244 127.0.0.1:5432 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
SSH on port 22, here, is reachable from the whole network on every interface. The database on 5432 isn't — it only takes local connections. That 0.0.0.0:* in the "Peer Address" column just means "any remote address, any port." netstat -an on Windows shows you the same thing.
Why this matters for security
Plenty of dev tools let you choose the bind address, and 0.0.0.0 quietly opens the service to anyone who can reach the machine — which on an open café or office network can be a surprising number of people:
# Reachable from the whole network
python3 -m http.server 8000 --bind 0.0.0.0
# Reachable only from this computer
python3 -m http.server 8000 --bind 127.0.0.1
Docker plays by the same rule. -p 8080:80 publishes on every host interface by default; -p 127.0.0.1:8080:80 locks it down to the host alone. If nothing outside the machine needs to reach a service, just bind it to loopback and move on.
127.0.0.1 or localhost instead.0.0.0.0/0: the default route and "anywhere"
CIDR's /0 means zero bits need to match — so 0.0.0.0/0 catches every single IPv4 address there is. Because routers always pick the longest matching prefix, this one only ever gets used as a last resort, when nothing more specific fits. That makes it the default route: the path to your default gateway. Windows' route print shows it like this:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.23 35
Linux spells the same route default via 192.168.1.1. Want a feel for just how much ground /0 covers? Our subnet calculator will show you it's the entire 4,294,967,296-address IPv4 space, all at once.
Flip over to firewall rules and cloud security groups, and a source of 0.0.0.0/0 means exactly one thing: from any address on the internet, no exceptions. Open port 22 or 3389 to 0.0.0.0/0 and you've just handed SSH or Remote Desktop to the entire world — easily one of the most common cloud misconfigurations out there. Scope rules like that down to the addresses you actually connect from, always.
0.0.0.0 in hosts files and DNS blocking
DNS-level ad blockers, and anyone hand-editing a hosts file, love pointing unwanted domains straight at 0.0.0.0:
0.0.0.0 ads.example.com
0.0.0.0 tracker.example.com
Since 0.0.0.0 isn't a destination that exists anywhere, the connection just fails, fast, instead of actually reaching a server. Some older lists use 127.0.0.1 instead — but that routes the request to whatever web server happens to be running on your own machine, which is rarely what you want. Either blocks the domain fine; 0.0.0.0 is simply the more common pick in modern blocklists.
Why browsers started blocking 0.0.0.0
Here's the catch with Linux and macOS quietly routing 0.0.0.0 connections to the local machine: a malicious public website can exploit exactly that, firing requests at http://0.0.0.0:PORT to reach development servers or other services sitting on a visitor's own computer — sidestepping the protections built around localhost. Security researchers called this out publicly in 2024, and Chrome responded by blocking public websites from reaching 0.0.0.0 at all, with other browsers following suit soon after. So if some local tool suddenly stops working the moment you open it from a web page, this is very likely why — point it at http://127.0.0.1 directly instead.
The IPv6 equivalents
| Meaning | IPv4 | IPv6 |
|---|---|---|
| Unspecified address | 0.0.0.0 | :: (128 zero bits, RFC 4291) |
| Listen on all interfaces | 0.0.0.0:80 | [::]:80 |
| Default route / any address | 0.0.0.0/0 | ::/0 |
| Loopback (for comparison) | 127.0.0.1 | ::1 |
Here's a wrinkle worth knowing: on many systems a socket bound to [::] happily accepts IPv4 connections too, unless IPV6_V6ONLY is explicitly set — so a server listening on [::]:80 might well be reachable over both protocols without anyone intending that. And :: shows up during IPv6's duplicate address detection too, as the source address, which is basically the IPv6 version of what 0.0.0.0 does for DHCP.
Frequently asked questions
Is 0.0.0.0 a valid IP address?
Valid and reserved, yes, with its own special meanings — but not something you can actually use as a host address. You can't assign it to a device for ordinary communication, and you can't reach a server at it over a network.
Is 0.0.0.0 the same as 127.0.0.1?
Not remotely. 127.0.0.1 is loopback, a real destination that means "this computer, specifically." 0.0.0.0 means unspecified — "all interfaces" when something's listening, "any address" inside a route or rule.
Why does my router or app show a gateway of 0.0.0.0?
Inside a routing table, that usually just means the network is directly connected and doesn't need a gateway at all. But if your own adapter's settings list the default gateway as 0.0.0.0, that's different — it hasn't been properly configured yet, so reconnect or renew the DHCP lease.
Is it dangerous to see 0.0.0.0 in netstat?
Not on its own — it just tells you the service accepts connections on every interface. Worth asking yourself whether that service really should be reachable from your network, though, and binding it to 127.0.0.1 or firewalling it if the answer is no.
Commentaires
Partagez une astuce, posez une question ou racontez comment l’outil a fonctionné pour vous.