title: MongoDB server can still be accessed without credentials
body: <p>I have a fresh mongodb server (2.6.0) in my machine and I started the mongod instance with the following config file:</p>
  
  <pre><code>dbpath = c:\mongo\data\db
  port = 27017
  logpath = c:\mongo\data\logs\mongo.log
  auth = true
  </code></pre>
  
  <p>Later, I connected to this mongod instance through mongo shell and created an admin user:</p>
  
  <pre><code>use admin
  db.createUser(
    {
      user: "tugberk",
      pwd: "12345678",
      roles:
      [
        {
          role: "userAdminAnyDatabase",
          db: "admin"
        }
      ]
    }
  )
  </code></pre>
  
  <p>Then, I logged out from the shell and reconnect with the following command:</p>
  
  <pre><code>mongo --host localhost --port 27017 -u tugberk -p 12345678 --authenticationDatabase admin
  </code></pre>
  
  <p>Then, I created a user with root access:</p>
  
  <pre><code>use admin
  db.createUser(
      {
        user: "tugberkRoot",
        pwd: "12345678",
        roles: [ "root" ]
      }
  )
  </code></pre>
  
  <p>The last step is not necessary here but the anonymous access now should have been fully disabled. However, I can still connect to it anonymously through mongo shell (even if I don't have any access to do anything):</p>
  
  <p><img src="https://i.stack.imgur.com/iDEYj.png" alt="enter image description here"></p>
  
  <p>What should I do to prevent any anonymous connection?</p>