The difference between 127.0.0.1 and 0.0.0.0

      No Comments on The difference between 127.0.0.1 and 0.0.0.0

127.0.0.1 typically refers to loopback local-only terminal
0.0.0.0 depending on the context, this typically instructs an application to listen on every available interface.

Example:

With following MongoDB configuration

Mongo will be available only locally. Even if you open port 27017 on all interfaces, Mongo won’t be available on these ports and to anyone from outside world it will appear as if on port 27017

On the other hand, if we change 127.0.0.1 to 0.0.0.0

Mongo will be listening on port 27017 on all network interfaces.

Leave a Reply

Your email address will not be published. Required fields are marked *