CIDR reference · IPv4

0.0.0.0/0: the default route

Every IPv4 address. Used as the default route and as "anywhere" in access rules.

0.0.0.0/0 · 0.0.0.0 Open in the calculator

0.0.0.0/0 means every IPv4 address. It appears as the default route in routing tables, as "anywhere" in firewall and security-group rules, and as the catch-all in allowlists. A security group that allows port 22 from 0.0.0.0/0 exposes SSH to the whole internet; restrict it to your own ranges.

On Linux, ip route show default prints the default route, which is the 0.0.0.0/0 entry pointing at your gateway. In cloud route tables the same entry sends internet-bound traffic to an internet gateway or NAT gateway. The IPv6 equivalent is ::/0, and a rule that is meant to cover "everything" needs both.

Key numbers

Prefix length/0 (0 network bits, 32 host bits)
Subnet mask0.0.0.0
Mask in binary00000000.00000000.00000000.00000000
Wildcard mask255.255.255.255
Total addresses4,294,967,296
Usable hosts4,294,967,294 (theoretical)
Contains16,777,216 × /24 networks

Example ranges

Private (RFC 1918) blocks of this size. Click one to open it in the calculator.

BlockFirst addressLast addressUsable hosts
0.0.0.0/00.0.0.0255.255.255.2550.0.0.1 – 255.255.255.254

How the numbers are derived

An IPv4 address has 32 bits. A /0 uses 0 of them for the network, leaving 32 host bits, so the block has 232 = 4,294,967,296 addresses. The subnet mask is 0 ones followed by 32 zeros, written in dotted decimal as 0.0.0.0; the wildcard mask 255.255.255.255 is its inverse, used in Cisco ACLs and OSPF configuration.

FAQ

Is 0.0.0.0/0 the same as "any"?

Yes. In firewalls, security groups and route tables it matches every IPv4 address. The IPv6 equivalent is ::/0.

Why is 0.0.0.0/0 on port 22 a problem?

It lets any address on the internet attempt SSH logins. Restrict to known ranges or use a bastion, VPN or session manager.