How to listen only to localhost on MongoDB

后端 未结 4 868
一生所求
一生所求 2020-12-13 02:11

MongoDB Suggests that the easy way to handle security is to run it in a trusted environment, given that, \"in such a configuration, one must be sure only trusted machines ca

4条回答
  •  没有蜡笔的小新
    2020-12-13 02:59

    Add the following line into mongodb.conf:

    bind_ip = 127.0.0.1
    

    As @Josh Rickard stated in comments: don't forget to restart the process after updating the config file:

    service mongodb restart
    

提交回复
热议问题