Can't connect to mongodb.Could not connect to any servers in your MongoDB Atlas cluster

The IP address seen by Atlas is not necessarily the IP address of your workstations. If behind a router that does NAT or using VPN the address seen is the one of the router or the exit point of the VPN.

First try to Allow Access From Anywhere. If it works it is most likely because you whitelisted an IP address that is not your public address. Find your public IP with https://www.whatismyip.com/.

If the above does not work then we need more information to help.

37 Likes