Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15630

Empty net.bindIp listens to all interfaces

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.4, 2.7.7
    • Component/s: Security, Usability
    • ALL

      Invalid bindIp in the YAML config file results in mongod listening to all interfaces rather then erroring out

      $ cat mongod.conf

      net:
         bindIp:
         port: 27017
      

      $ mongod --config mongod.conf

      2014-10-13T14:05:56.040-0700 [initandlisten] MongoDB starting : pid=11881 port=27017 dbpath=/data/db 64-bit host=toddler.local
      2014-10-13T14:05:56.041-0700 [initandlisten] db version v2.6.4
      2014-10-13T14:05:56.041-0700 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
      2014-10-13T14:05:56.041-0700 [initandlisten] build info: Darwin bs-osx108-4 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      2014-10-13T14:05:56.041-0700 [initandlisten] allocator: system
      2014-10-13T14:05:56.041-0700 [initandlisten] options: { config: "mongod.conf", net: { bindIp: true, port: 27017 } }
      

      $ netstat -na | grep 27017

      tcp4       0      0  *.27017                *.*                    LISTEN
      

            Assignee:
            andreas.nilsson Andreas Nilsson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: