我想配置mongodb以允许来自外部ip地址的远程连接66.31.123.123
.
设置0.0.0.0
于bind_ip
作品,但我想更严格,只允许特定的IP地址进行连接.我附加66.31.123.123
到bind_ip
列表但mongodb抛出以下错误:
mongodb.conf
bind_ip = 127.0.0.1,66.31.123.123 port = 27017 auth = true
mongodb日志
Mon Dec 9 03:25:59 [initandlisten] ERROR: listen(): bind() failed errno:99 Cannot assign requested address for socket: 66.31.123.123:27017
问题:为什么添加外部IP不起作用?如果auth=true
使用,确实使得它足够安全使用0.0.0.0
的bind_ip
?mongodb将在Meteor.js应用程序中进行本地访问.