0.0.0.0/0 CIDR range, which is the officially supported approach for cloud platforms with dynamic IPs.
When Does It Occur?
You’ll see the following error in your application logs when your code attempts to open a connection to your MongoDB Atlas cluster:Why Does It Occur?
MongoDB Atlas enforces an IP access list on every cluster. By default, no IP addresses are allowed to connect — you must explicitly whitelist the IP your application connects from. Because Virtus Cloud assigns a fresh IP on every application restart, any specific IP you add to the Atlas whitelist will become invalid the next time your application restarts, causing theMongoNetworkError.
How to Fix It
You need to add0.0.0.0/0 to your MongoDB Atlas IP access list. This CIDR notation represents all IPv4 addresses and tells Atlas to accept connections from any source — including Virtus Cloud’s dynamic IPs.
Log in to MongoDB Atlas
Open cloud.mongodb.com and sign in to your Atlas account.
Select your project and cluster
From the Atlas dashboard, select the project that contains the cluster your application connects to.
Open the Network Access settings
In the left-hand navigation menu, click Network Access under the Security section.
Add a new IP access list entry
Click the Add IP Address button (or + Add IP Address if entries already exist).
Enter 0.0.0.0/0 and confirm
In the Access List Entry field, type
0.0.0.0/0. Optionally add a comment such as Virtus Cloud - dynamic IP in the Comment field for future reference. Click Confirm to save the entry.You can also click the Allow Access from Anywhere button in the dialog — it populates the 0.0.0.0/0 value for you.Wait for the change to propagate
Atlas applies IP access list changes within a few seconds. Once the entry shows as Active, your application can connect.
Verifying the Connection
After updating your Atlas access list and restarting your application, open the Logs panel in the Virtus Cloud dashboard. A successful MongoDB connection typically looks like:MongoNetworkError persists after whitelisting 0.0.0.0/0, check the following:
Verify your connection string
Verify your connection string
Ensure your
MONGODB_URI or connection string is correct. It should start with mongodb+srv:// for Atlas clusters and include your username, password, and cluster hostname. Double-check for typos in the cluster hostname.Verify your database user credentials
Verify your database user credentials
Open Database Access in Atlas and confirm the user your application authenticates as exists and has the correct password. If in doubt, reset the user’s password and update your application’s environment variable.
Check your Atlas cluster status
Check your Atlas cluster status
From the Atlas dashboard, confirm your cluster is in an Active state and not paused. Free-tier clusters on Atlas pause automatically after 60 days of inactivity.
If you continue to experience connection issues after following these steps, contact the Virtus Cloud support team.