Networking Security: Atlas / Using the IP Access List

Code Summary: Using the IP Access List

The following provides a summary of the code that adds an IP address to the IP Access List in Atlas.

Prerequisites

  • Atlas Account
  • Atlas organization ID
  • Atlas Project ID
  • Atlas CLI

Usage

Add an IP Address to the Access List:

The following command adds a temporary IP address to the Atlas project access list. The access will be removed automatically after July 4, 2025. Replace <ip_address> and <project-id> with your values. 

atlas accessList create \
  <ip_address> \
  --deleteAfter 2025-07-04T18:18:18+0000 \
  --projectId <project-id> \
  --comment "Temporary access for debugging"

View the IP Access List:

The following command lists all access list entries for the specified Atlas project in JSON format. Replace <project-id> with your project’s ID.

atlas accessLists list \
  --projectId <project-id> \
  --output json

View a Specific IP Access List Entry:

The following command shows details about a specific access list entry for the given IP address in an Atlas project, outputting the result in JSON format. Replace <ip-address> and <project-id> with your values.

atlas accessLists describe \
  <ip-address> \
  --projectId <project-id> \
  --output json

Delete an IP Access List Entry:

The following command removes a specific IP address from the access list of an Atlas project. Replace <ip-address> and <project-id> with your values.

atlas accessLists delete \
  <ip-address> \
  --projectId <project-id>