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

后端 未结 1 1027
北荒
北荒 2021-02-07 05:47

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

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 06:05

    As guido said, the bind_ip is for the mongo server's own IP address.

    Auth is a good idea but only relying on auth opens you up to a brute force attack.

    You could bind_ip = 0.0.0.0 and use a firewall to block all incoming connections to port 27017, unless coming from 66.31.123.123.

    Another concern is proximity of your meteor server to your mongo server — is it on private networking or across public network. If across public, you should either recompile mongodb to support SSL, or you should tunnel your mongodb connection through SSH.

    If you do decide to tunnel, bind_ip to 127.0.0.1 and leave out incoming 27017.

    0 讨论(0)
提交回复
热议问题