I'm building a website, and am using MongoDB Atlas for my database. In the MongoDB Network Access section, I have to specify an IP address to connect from in order to establish the database connection, and since I'm using a cloud service to run my server from, I have to select the "Allow access from anywhere" option, which sets the IP address to 0.0.0.0. Is there an alternative to selecting this option and still using the cloud IDE? I'm assuming allowing access to the database from anywhere is not secure, though I also don't know exactly how under this setting other people could access my database and post to it without the source code and/or my MongoDB Atlas login information.
From the mongodb documentation, if you have strong credentials and you're not sharing it, you should be good.
IMPORTANT: Adding the CIDR 0.0.0.0/0 allows access from anywhere. Ensure that strong credentials (username and password) are used for all database users when allowing access from anywhere.
https://www.mongodb.com/docs/atlas/security/ip-access-list/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With