Faced problem in connecting database from my cellular network

When I am connecting my application from the official network (it is the fixed network, with IP address 202.141.222/32) my application is connected successfully and can save data into my collection. but when I am doing work from home(my home network is cellular, with the IP address 199.160.98.81/32) it is showing me the error of connection failure, the application can’t connect with the database. Even I have changed the DNS of the cellular network also.
While connecting to my cellular network, I also added an IP access list that “allows access from anywhere” but showed the same error, when I tried to connect the application to the database. I have spent much time on and tried to sort it out but couldn’t connect to the database using my cellular network. So if anybody will help me to understand this error

Hi @Iram_Barkat

If you’re able to connect to Atlas from some network and not from others, then it’s highly likely that the issue resides in the problematic network. Perhaps there are some restrictions in your cellular network? I’ve seen many cases where some network disallows connection to non-HTTP/HTTPS ports (80 and 443). Since MongoDB uses port 27017, maybe this is restricted by the cellular network.

Unfortunately there’s not much Atlas can do for this. The best way forward is to contact your cellular provider and asking for clarification about this from their end. Perhaps you can use a VPN product to work around this issue?

Best regards
Kevin

Hi last whole week I spent finding out the problem with my cellular network 's technical team. They have done some testing on their end. They told me that HTTP/non-HTTP ports are allowed at their end. Today they conclude that it needs to check on your end if the MongoDB server has some source-based restriction against mine cellular network Source IPs i.e. 119.160.0.0/16. so please check it, it will be helpful for me.

To connect to MongoDB Atlas, the port 27017 must be allowed from the network. Is it possible to double check with your provider that this port is allowed outgoing traffic?

This is totally under your control in the Atlas IP whitelist setting. Please see Configure IP Access List Entries on how to do this.

However I find it curious that you can connect from a fixed network successfully but not from your cellular network. Perhaps you can try connecting using a VPN while using your cellular connection and see if using VPN enables you to connect?

Best regards
Kevin

1 Like

What do you get when you follow https://www.mongodb.com/community/forums/t/not-able-to-connect-to-atlas-cluster-given/199232/4?u=steevej.

1 Like

let me check with the solutions you have discussed. Thank you