MongoDB只允许本地访问

2014-11-24 17:03:01 · 作者: · 浏览: 0

不需要用iptables帮忙,仅在mongodb.conf文件中添加一行配置即可:

bind_ip = 127.0.0.1
然后重新启动服务即可。