What does 0.0.0.0/0 mean?
0.0.0.0/0 is a prefix of length zero, so no bits have to match: it covers every IPv4 address, all 4,294,967,296 of them. In a routing table it is the default route; in a firewall or security group rule it means "from anywhere".
0.0.0.0/0 is 4,294,967,296 addresses: 0.0.0.0 to 255.255.255.255. 4,294,967,294 usable for hosts (the first is the network address, the last is broadcast).
- Network
0.0.0.0- First usable
0.0.0.1- Last usable
255.255.255.254- Broadcast
255.255.255.255- Addresses
4,294,967,296- Usable hosts
4,294,967,294- Netmask
0.0.0.0- Wildcard (ACL) mask
255.255.255.255- Historic class
A- Range type
The entire IPv4 address space (the default route; 'anywhere' in firewall rules)
This block contains special-purpose ranges: 0.0.0.0/8 (This network), 10.0.0.0/8 (Private network), 100.64.0.0/10 (Shared address space (carrier-grade NAT)), 127.0.0.0/8 (Loopback), 169.254.0.0/16 (Link-local), 172.16.0.0/12 (Private network), 192.0.0.0/24 (IETF protocol assignments), 192.0.2.0/24 (Documentation (TEST-NET-1)) and more.
Split it into subnets
4 subnets.
| Subnet | Usable range | Hosts | Broadcast |
|---|---|---|---|
0.0.0.0/2 | 0.0.0.1 – 63.255.255.254 | 1,073,741,822 | 63.255.255.255 |
64.0.0.0/2 | 64.0.0.1 – 127.255.255.254 | 1,073,741,822 | 127.255.255.255 |
128.0.0.0/2 | 128.0.0.1 – 191.255.255.254 | 1,073,741,822 | 191.255.255.255 |
192.0.0.0/2 | 192.0.0.1 – 255.255.255.254 | 1,073,741,822 | 255.255.255.255 |
Is this IP in the range?
Range to CIDR blocks
What to know
Routers pick the longest matching prefix, and /0 is the shortest possible, so the default route is used only when nothing more specific matches. ip route add default via 192.168.1.1 on Linux installs exactly this route, and a cloud route table sends 0.0.0.0/0 to an internet or NAT gateway.
In an inbound rule, 0.0.0.0/0 exposes the port to the whole IPv4 internet. That is normal for ports 80 and 443 on a public web server and a common mistake for SSH (22), RDP (3389) and databases.
Gotchas
- 0.0.0.0/0 covers only IPv4. To match all IPv6 traffic too, you need a separate
::/0rule, and if you only restrict IPv4, a service may still be reachable over IPv6. - The address 0.0.0.0 (no prefix) as a listen address means "all local interfaces". That is a different idea from the 0.0.0.0/0 network.
- Host counts and a broadcast address computed for a /0 have no practical meaning: it is a matching rule, not a network anyone configures on an interface.
Related explainers
- What does /32 mean?A /32 is one IPv4 address: netmask 255.255.255.255, no network or broadcast. Used in firewall and security...
- Private IPv4 address ranges (RFC 1918)The three private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Their sizes, exact...
- IPv4 subnet cheat sheetEvery IPv4 prefix length from /0 to /32 with its netmask, total addresses and usable hosts. How to read...