I am trying to bind multiple IP to mongodb config file, one is
0.0.0.0 and other is
127.0.0.1. I did the following change in configuration file
# network interfaces net: port: 27017 bindIp: "0.0.0.0,127.0.0.1"
Than I reloaded the configuration by the following command
sudo mongod --config /etc/mongod.conf
Than checked if the server is listening on localhost as well or not by the following command.
It shows the output only for
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN -
Why is it not listening to localhost as well?