What are the differences between IP address 0.0.0.0 and 127.0.0.1?

IP address 0.0.0.0, means all IP addresses on the local machine.

Example

Let say we have a machine that has two IP addresses (192.168.1.18 and 10.1.2.1) and the apache webserver runs on it. Now if we allow apache webserver to listen listen on 0.0.0.0, it will be reachable at both of those IP addresses.

When a service is listening on 0.0.0.0 this means the service is listening on all the configured network interfaces, when listening on 127.0.0.1 the service is only bound the local machine.

Share