LightAtom

0.0.0.0: What It Means

0.0.0.0 means “no particular address”.

A server listening on 0.0.0.0 accepts connections on every network interface; a device that shows 0.0.0.0 as its own IP has no address yet; in a routing table 0.0.0.0/0 is the default route.

0.0.0.0 has different meanings depending on context, which confuses people. For a listening socket it means all interfaces; as a destination it's invalid and connections fail fast (which is why ad blockers use it in hosts files); and as a route, 0.0.0.0/0 matches everything, the default route.

Facts

Address
0.0.0.0
Owner
Reserved (“this network”)

On a Mac

When lsof or LightAtom shows a port on * or 0.0.0.0, it's reachable from other devices on your network, not just localhost. In /etc/hosts, mapping a domain to 0.0.0.0 blocks it.

Frequently asked questions

What does 0.0.0.0 mean?

It means no specific address. Servers bound to 0.0.0.0 listen on all interfaces, and 0.0.0.0/0 is the default route that matches every destination.

Is listening on 0.0.0.0 dangerous?

It makes the service reachable from your network (and the internet if forwarded). Bind to 127.0.0.1 if only your Mac should connect.

Why do hosts files use 0.0.0.0?

Connections to 0.0.0.0 fail immediately, so mapping a domain to it blocks the domain quickly without waiting for a timeout.

LightAtom team

The people who build LightAtom, a network monitor for macOS.