Remediation
From Google Cloud Console
- Go to the
VM instancespage by visiting: https://console.cloud.google.com/compute/instances. - Click on the instance name to go the the
Instance detail page. - Click
Edit. - For each Network interface, ensure that
External IPis set toNone. - Click
Doneand then clickSave.
From Google Cloud CLI
-
Describe the instance properties:
gcloud compute instances describe {{instance-name}} \
--zone={{zone}} -
Identify the access config name that contains the external IP address. This access config appears in the following format:
networkInterfaces:
- accessConfigs:
- kind: compute#accessConfig
name: External NAT
natIP: 130.211.181.55
type: {{one-to-one-nat}} -
Delete the access config.
gcloud compute instances delete-access-config {{instance-name}} \
--zone={{zone}} \
--access-config-name {{access-config-name}}
In the above example, the ACCESS_CONFIG_NAME is External NAT. The name of your access config might be different.