title: MongoDB bind_ip error: bind() failed errno:99 Cannot assign requested address for socket
body: <p>I want to configure mongodb to allow remote connections from an external ip address like <code>66.31.123.123</code>.</p>
  
  <p>Setting <code>0.0.0.0</code> to <code>bind_ip</code> works, but I want to be more restrictive and only allow certain ip addresses to connect. I appended <code>66.31.123.123</code> to the <code>bind_ip</code> list but mongodb throws an error below:</p>
  
  <p><strong>mongodb.conf</strong></p>
  
  <pre><code>bind_ip = 127.0.0.1,66.31.123.123
  port = 27017
  
  auth = true
  </code></pre>
  
  <p><strong>mongodb logs</strong></p>
  
  <pre><code>Mon Dec  9 03:25:59 [initandlisten] ERROR: listen(): bind() failed errno:99 Cannot assign requested address for socket: 66.31.123.123:27017
  </code></pre>
  
  <p><strong>Question:</strong> Why does adding an external ip not work? If <code>auth=true</code> is used, does that make it safe enough to use <code>0.0.0.0</code> as the <code>bind_ip</code>? The mongodb will be locally accessed from a Meteor.js app.</p>