mongodb.conf bind_ip = 127.0.0.1 does not work but 0.0.0.0 works

Everywhere it’s written that you have to bind them like this

bindIp : 127.0.0.1,192.168.0.50

but it doesn’t work.

how it works, in the version 3.2.0 is

bindIp : [127.0.0.1,192.168.0.50]

so try to add your ips inside the [ ]

example :

# network interfaces
net:
      port: 27017
      bindIp : [127.0.0.1,0.0.0.0]  (read what is written below in BOLD!)

However 0.0.0.0 opens up the stuff. While this is ok for TESTING, for production you should know the security implications of this setting!

Leave a Comment