I'm having trouble connecting to my MongoDB Atlas cluster.
Network Access Settings – I've added my IP to the allowed list and even upload any Ip to this list (0.0.0.0)
2)Database Users – My user is correctly set up
Connection Error – When I try to connect, I get the following error:
connect ETIMEDOUT MYIP:27017. It looks like this is a MongoDB Atlas cluster. Please ensure that your Network Access List allows connections from your IP.
I read somewhere that changing DNS to 8.8.8.8 and 8.8.4.4 might help, but that didn't solve the issue.
Does anyone have other suggestions for what could be causing this or how to fix it?
After a lot of troubleshooting, I discovered the issue wasn’t with MongoDB Atlas, my IP allowlist, or my database user setup. The real problem was the Wi-Fi network I was using.
I was on a public Wi-Fi that had restrictions and was blocking outgoing connections on certain ports, including MongoDB’s default port (27017
). Because of that, the connection kept timing out.
Solution: Switching to another network (or using a mobile hotspot) immediately solved the problem.