IP BindingIP绑定
On this page本页内容
Overview概述
MongoDB binaries, MongoDB二进制文件mongod
and mongos
, bind to localhost by default. If the net.ipv6
configuration file setting or the --ipv6
command line option is set for the binary, the binary additionally binds to the localhost IPv6 address.mongod
和mongos
默认绑定到localhost。如果为二进制文件设置了net.ipv6
配置文件设置或--ipv6
命令行选项,则二进制文件将额外绑定到localhost IPv6地址。
Considerations注意事项
If the 如果为二进制文件设置了net.ipv6
configuration file setting or the --ipv6
command line option is set for the binary, the binary additionally binds to the localhost IPv6 address.net.ipv6
配置文件设置或--ipv6命令行选项,则二进制文件将额外绑定到localhost ipv6地址。
To bind to all IPv4 addresses, you can specify the bind ip address of 要绑定到所有IPv4地址,可以指定0.0.0.0
. 0.0.0.0
的绑定ip地址。To bind to all IPv4 and IPv6 addresses, you can specify the bind ip address of 要绑定到所有IPv4和IPv6地址,可以指定绑定ip地址::,0.0.0.0
or alternatively, use the new net.bindIpAll
setting or the new command-line option --bind_ip_all
.::,0.0.0.0
,或者使用新的net.bindIpAll
设置或新的命令行选项--bind_ip_all
。