MongoDB DBA · Question 380 · Multiple choice

Which of the following is true about the auth and the bind_ipsettings in MongoDB for a mongod instance in terms of best practice for security? Check all that apply:

Answer options

  1. A.
    The setting bind_ip limits access to the defined list of IP addresses.
  2. B.
    The setting auth should be used with bind_ip to combine authentication with a list of allowable external IP addresses.
  3. C.
    The setting bind_ip only limits access with regard to external IP addresses, local host IP addresses can still connect normally.

Answer confidence: High

Correct answer: A, B

Explanation language: Chinese

bindIp 把监听地址限制在列表内的 IP 上,从网络层缩小暴露面;最佳实践是同时开启 auth(authorization),让连接既受 IP 白名单限制又必须通过身份认证,所以 A、B 正确。C 错在 bindIp 同样限制本机来源——只有把 127.0.0.1 写进列表本机才能连,未列出的 localhost 连接会被拒绝(localhost exception 只与“库中还没有用户”有关)。

Papers containing this question

This question appears in 2 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗