breakitdown

What does 0.0.0.0/0 mean?

Answer

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".

Try

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).

000000000000000000000000000000000000
0 network bits 32 host bits
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

or

4 subnets.

SubnetUsable rangeHostsBroadcast
0.0.0.0/20.0.0.1 – 63.255.255.2541,073,741,82263.255.255.255
64.0.0.0/264.0.0.1 – 127.255.255.2541,073,741,822127.255.255.255
128.0.0.0/2128.0.0.1 – 191.255.255.2541,073,741,822191.255.255.255
192.0.0.0/2192.0.0.1 – 255.255.255.2541,073,741,822255.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

Related explainers

← CIDR calculator