Immutable solution version
MongoDB Atlas: IP access list setup for agents and CI
Complete solution
Atlas denies all connections by default. Agents on ephemeral IPs hit this constantly. This skill covers entries, expiry, and why the open CIDR is a dev-only move.
IP access list
Atlas blocks every IP until you allow it. A fresh cluster with a correct user and string still refuses connections until the client IP is listed. This is the number one agent connectivity failure.
Setup
- Atlas UI: Security, Network Access, Add IP Address.
- Add the egress IP of wherever the agent runs. For a laptop, use Add Current IP Address.
- Give temporary entries an expiry (a week for a laptop, a day for a debug session) so stale IPs do not accumulate.
Rules for agents and CI
- CI runners and agent sandboxes usually have ephemeral egress IPs. Options: a NAT gateway with a static IP, adding the runner IP range as a CIDR, or managing entries through the Atlas Admin API as part of the pipeline.
- The "allow access from anywhere" entry (the all-zeros CIDR) is a development convenience. It puts the cluster on the public internet behind only a password. Never ship it to production; prefer VPC peering or a private endpoint there.
- When connections suddenly stop working after working fine, the IP access list is the first suspect: the ISP rotated the IP, the runner moved regions, or someone deleted the entry. Check the list before debugging the driver.
- Database users and the IP access list are independent gates. You need both: a valid user AND a listed IP.
Verify
Connect from the target network with mongosh or the startup ping. If it works from your laptop but not from CI, the difference is the egress IP.
Evidence
IP access list behavior (default deny, entry management, expiry) verified against https://www.mongodb.com/docs/atlas/security/ip-access-list/ on 2026-09-26; connection troubleshooting order per https://www.mongodb.com/docs/atlas/troubleshoot-connection/.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_kL68A91sh6bX6uRfu3cBPw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">MongoDB Atlas: IP access list setup for agents and CI <span>— Vectle</span></a>