![]() sudo ufw statusĪs a result, the output will show that traffic to port 27017 from the remote server is now allowed. Run the below command to verify the change in firewall settings with ufw. Moreover, if you wish to access the MongoDB from another machine then run this command with the new machine’s IP address in place of trusted_server_ip sudo ufw allow from trusted_server_ip to any port 27017 Also, make sure to change trusted_server_ip to the IP address of the trusted remote machine you’ll use to access your MongoDB instance. Run the below command that will open up access to MongoDB’s default port while explicitly only allowing the IP address of the other trusted server. Here is an example output that shows that the MongoDB process is listening for connections on its default port, 27017. However, if you wish to connect to your MongoDB server from a remote location, you have to allow incoming connections to the port where the database is listening by adding a new UFW rule.įirst, check the port to which the MongoDB is listening. If you wish to use MongoDB locally with the applications running on the same server, then this is the recommended setting. Make sure to enable a UFW firewall on the server. ![]() ![]() Now let’s see the process of configuring the MongoDB to allow remote access on Ubuntu.īefore getting into the procedure, make sure that you have a server running Ubuntu 18.04, MongoDB installed on your server, another computer from which you’ll access your MongoDB instance. General distributions for MongoDB support Windows, Linux, Mac OS X, and Solaris.Ĭonfigure remote access for MongoDB on Ubuntu 18.04 So you need not worry about the data structure such as the number of fields or types of fields to store values. Here, the data objects are stored as separate documents inside a collection. It is also known as Mongo which is mainly used in modern web applications. MongoDB is a free and open-source NoSQL document database. Today we’ll see how to configure remote access for MongoDB on Ubuntu 18.04 Here at Bobcares, we have seen several such Ubuntu related installations as part of our Server Management Services for web hosts and online service providers. Willing to configure MongoDB installation that securely allows remote access on Ubuntu? We can help you with it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |