© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•8mo ago•
21 replies
burrrr

Worker unable to connect to Mongodb Atlas (IP Whitelist)

I'm trying to connect to my MongoDB Atlas cluster from a Cloudflare Worker. The cluster has IP whitelisting enabled. I added all the published Cloudflare IP ranges to the whitelist, but the Worker still can't connect.

If I remove the IP restriction in Atlas, the connection works — so it seems the Worker isn’t using the IPs listed in Cloudflare’s docs.

I even pinged the Worker and saw an IP that's within the whitelisted range, and I tried manually adding that exact IP to Atlas — still no luck.

So my question is:
How can I find out what IPs Workers use for outbound requests to whitelist in MongoDB Atlas?
Or what's the right solution to make this setup work securely?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Worker Unable to Connect Env Variables
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Mongodb connect err
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Worker exit IP
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago