MongoDB Configuration – How to Set Multiple bindIp Addresses in Mongod Config?

mongodb-3.4

I have the following config file:

net:
  bindIp: 127.0.0.1
  port: 27017

storage:
  dbPath: c:\mongoDATA\db
  journal:
    enabled: true

##systemLog:
 ## destination: file
 ## path: C:\mongoDATA\log\mongodb.log   
 ## logAppend: true

this works, but when I try to add multiple ports like:

bindIp: 127.0.0.1, 192.168.10.115
or
bindIp: "127.0.0.1, 192.168.10.115"
or
bindIp: [127.0.0.1, 192.168.10.115]

with or without the space after the comma it doesn't. Could someone provide the write syntax? Thanks (using 3.6 community)

Best Answer

without a space after the comma, AND the ip address has to present

Related Question