# Ensure Instance IP Assignment Is Set to Private

- Source: https://support.icompaas.com/support/solutions/articles/62000235335-ensure-instance-ip-assignment-is-set-to-private
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [GCP Benchmarks](https://support.icompaas.com/support/solutions/62000112667) › [GCP Knowledge Bases](https://support.icompaas.com/support/solutions/folders/62000169178)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### **Profile Applicability:**

-   **Level 1**
    

### **Description****:**

Cloud instances should be configured to use **private IP addresses** instead of public IPs whenever possible. Assigning private IPs enhances network security by limiting direct internet exposure and reduces the attack surface.

**Rationale****:**

-   Using **private IPs** restricts instance accessibility to within the Virtual Private Cloud (VPC) or connected networks.
    
-   Public IPs expose instances directly to the internet, increasing risks from external threats.
    
-   Private IP assignment supports compliance and best practices in network security.
    

### **Impact****:**

-   Instances without public IPs cannot be accessed directly from the internet.
    
-   Remote access and service connectivity must be handled through VPNs, bastion hosts, or private networking solutions.
    
-   Requires updates to architecture and access management.
    

### **Default Value****:**

-   Many cloud platforms assign public IPs by default unless specified otherwise.
    

### **Audit Steps****:**

#### **Using Cloud Console**:

1.  Navigate to the **Compute Engine** (or equivalent) instances page.
    
2.  Review the **Network interfaces** section for each instance.
    
3.  Confirm the **External IP** is either **None** or set to **Private**.
    
4.  Repeat for all instances.
    

#### **Using CLI**:

gcloud compute instances list --format="table(name,zone,networkInterfaces.networkIP,networkInterfaces.accessConfigs\[0\].natIP)"

-   Ensure `natIP` (external IP) is **empty** or **not assigned**.
    

### **Remediation Steps:**

#### Using Cloud Console:

1.  For existing instances, remove the external IP by editing the **Network Interface** and unassigning the external IP.
    
2.  For new instances, during creation, **do not assign an external IP**.
    
3.  Use private IP ranges and VPN or proxy solutions for external access.
    

#### Using CLI:

-   To create a new instance with **only private IP**:
    

gcloud compute instances create \[INSTANCE\_NAME\] --no-address --zone=\[ZONE\]

-   To remove the external IP from an existing instance (requires recreation or network interface update):
    

gcloud compute instances delete-access-config \[INSTANCE\_NAME\] --access-config-name "external-nat" --zone=\[ZONE\]

### **Backout Plan:**

1.  Reassign a public IP if connectivity is lost and immediate access is needed:
    

gcloud compute instances add-access-config \[INSTANCE\_NAME\] --access-config-name "external-nat" --zone=\[ZONE\]

2.  Verify instance connectivity post change.
    
3.  Notify teams if IP changes impact services or access.
    

### **References:**

-   Google Cloud Private IP Documentation
    
-   Managing External IP Addresses
    
-   GCP CLI Instances Documentation
    

### **CIS Controls:**

| 
Control

 | 

Description

 | 

IG 1

 | 

IG 2

 | 

IG 3

 |
| --- | --- | --- | --- | --- |
| 

3.3

 | 

Configure Data Access Control Lists

 | 

✅

 | 

✅

 | 

✅

 |
| 

14.6

 | 

Protect Information Through ACLs

 | 

✅

 | 

✅

 | 

✅

 |

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
