MongoDB bind_ip error: bind() failed errno:99 Cannot assign requested address for socket

Viewed 14820

I want to configure mongodb to allow remote connections from an external ip address like 66.31.123.123.

Setting 0.0.0.0 to bind_ip works, but I want to be more restrictive and only allow certain ip addresses to connect. I appended 66.31.123.123 to the bind_ip list but mongodb throws an error below:

mongodb.conf

bind_ip = 127.0.0.1,66.31.123.123
port = 27017

auth = true

mongodb logs

Mon Dec  9 03:25:59 [initandlisten] ERROR: listen(): bind() failed errno:99 Cannot assign requested address for socket: 66.31.123.123:27017

Question: Why does adding an external ip not work? If auth=true is used, does that make it safe enough to use 0.0.0.0 as the bind_ip? The mongodb will be locally accessed from a Meteor.js app.

1 Answers
Related