

Restricting MongoDB's Network Exposure
source link: https://www.digitalocean.com/community/conceptual_articles/mongodb-security-restricting-network-exposure
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conceptual article
Restricting MongoDB's Network Exposure
MongoDBSecurityNetworkingConceptualDatabases
-
By Mark Drake
Published onJune 29, 2021 189 views
MongoDB, also known as Mongo, is a document database used in many modern web applications. As with any database management system, it’s critical that those responsible for managing a Mongo database adhere to the recommended security best practices, both to prevent data from being lost in the event of a disaster and to keep it out of the hands of malicious actors.
This series of conceptual articles provides a high-level overview of MongoDB’s built-in security features while also highlighting some general database security best practices.
The most fundamental way you can protect the data you store in MongoDB is to limit network access to the server on which the database is running. One way to do this is to provision a virtual private network (VPN). A VPN presents its connection as if it were a local private network, allowing for secure communications between the servers within it. By running MongoDB behind a VPN, you can block access to any machine that isn’t connected to the same VPN.
On its own, though, a VPN may not be enough to prevent unauthorized users from accessing your MongoDB installation. For instance, there may be a large number of people who need access to your VPN but only a few of them need access to your Mongo database. You could have more granular control over who has access to your data by setting up a firewall on your database server.
A firewall provides network security by filtering incoming and outgoing traffic based on a set of user-defined rules. Firewall tools generally allow you to define rules with a high level of precision, giving you the flexibility to grant connections from specific IP addresses access to specific ports on your server. For example, you could write rules that would only allow an application server access to the port on your database server used by a MongoDB installation.
Another way to limit your database’s network exposure is to configure IP binding. By default, MongoDB is bound only to localhost upon installation. This means that, without further configuration, a fresh Mongo installation will only be able to accept connections that originate from localhost, or the same server on which the MongoDB instance is installed.
This default setting is secure, since it means the database is only accessible to those who already have access to the server on which it’s installed. However, this setting will cause problems if you need to access the database remotely from another machine. In such cases, you can additionally bind your instance to an IP address or hostname where the remote computer can reach the database server.
Related resources
Recommend
-
31
Confluent has announced changes to the license for some components of their Confluent Platform , a streaming platform which provides capab...
-
44
Google Maps Platform best practices: Restricting API keys 2019-08-23adminGoogleCloud...
-
21
GISAID , the Global Initiative on Sharing All Influenza Data , a service hosted and supported by the government of the Federal Republic of Germany stores...
-
13
The Chromium Chronicle: Restricting Target Visibility Episode 15: by Joe Mason in Montreal (November 2020)Pr...
-
13
Restricting Access to Flash Remoting Thursday, January 16, 2003 Tom Muck has posted some concerns about malicious developers potentially hijacking a Flash Remotin...
-
10
Django View Authorization: Restricting Access Django provides tools for both authentication and authorization. Django view authorization is typically done with decorators. This course will show you how to use these...
-
8
What are type-level predicates? In the context of programming, a predicate usually refers to a function that returns a boolean (yes/no) value. For example, these are predicates that are commonly used:
-
9
Italy slaps Google with $123M antitrust fine for restricting access to Android AutoItalian regulators say the firm unfairly blocked JuicePass from Android Auto
-
6
There Are No Laws Restricting “Stingray” Use. This New Bill Would Help. “Stingrays” mimic cellphone towers to intercept phone calls and texts. This is the first law that would regulate their use. ...
-
9
Sponsored Eliminate 80% of your cyber threat exposure with network visibility
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK