'what is the right waay to get traffic on a port in a computer?

When I bind my Database (MongoDB) to 0.0.0.0:5000, and I send a query from another PC connected to the same local network, using: the DB computer's ipv4 address and port 5000, I'm able to access the database.

However, if the Database is not running on 0.0.0.0, the connection fails. I'm sorry if this is a noob question, if any1 could explain or point me in the right direction it would be great!

Is running on 0.0.0.0 the right thing to do? if not, how do I get the traffic from my comp's port 5000 to be diverted to 127.0.0.1 (or something similar) port: 5000?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source