Mongodb – Security on MongoDB

mongodb

I have been reading up on the security of MongoDB. If my web app lives on the same server as the DB, can I just set the bindIP to 127.0.0.1? I'm not sure what the best practices are, but this should only allow the actual machine to access the DB right?

Best Answer

That's right, if there will be local binding only local connection could be made.

This could target overall performance - but this is other topic.

Don't forget to enable authentication - as a base security settings.

From comments :

When was thinking about performance then I had in mind running application server and mongo on same server.