Ensure that your Google Compute Engine instances are not configured to have external IP addresses in order to minimize their exposure to the Internet.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
To reduce attack surface, Google Cloud virtual machine (VM) instances should not have public IP addresses attached. Instead, VM instances should be configured to run behind load balancers.
Note: VM Instances created by Google Kubernetes Engine (GKE) should be excluded as some of these instances have external IP addresses and cannot be reconfigured by editing the instance settings. The instances provisioned by GKE service have names that start with "gke-" and are labeled "goog-gke-node".
Audit
To determine if your Google Cloud virtual machine (VM) instances are configured to use public/external IP addresses, perform the following actions:
Remediation / Resolution
To remove the public (external) IP address from your Google Compute Engine instances, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Backend services overview
- Connecting to VMs using advanced methods
- Connecting to VMs
- Reserving a static external IP address
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute instances list
- gcloud compute instances describe
- gcloud compute instances delete-access-config