# Define allowed external IPs for VM instances

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Define allowed external IPs for VM instances is a Google Cloud guardrail written in organization Policy Service. Limits which Compute Engine VM instances can use external IPv4 addresses. What it breaks: google documents that it does not restrict the use of IPv6 addresses.

```text
constraints/compute.vmExternalIpAccess
This list constraint defines the set of Compute Engine VM instances that are allowed to use external IPv4 addresses. This constraint doesn't restrict the use of IPv6 addresses.
By default, all VM instances are allowed to use external IPv4 and IPv6 addresses.
The allowed/denied list of VM instances must be identified by the VM instance name, in the form: projects/ PROJECT_ID /zones/ ZONE /instances/ INSTANCE
Supported prefix: is:
For more information, see Restrict external IP access to specific instances .
```

- **Blocks:** Limits which Compute Engine VM instances can use external IPv4 addresses. (legacy managed constraint, list.)
- **Breaks:** Google documents that it does not restrict the use of IPv6 addresses. ([source](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints))
- **Test before applying:** As for every Organization Policy Service guardrail: [how to test before enforcing](/mechanisms/org-policy/)
- **Mechanism:** [Organization Policy Service (managed and legacy constraints)](/mechanisms/org-policy/): Resources in the organization, folder or project where the policy is set and its descendants; Google says application of new policies is usually not retroactive.
- **Taken from:** [provider documentation](https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints), provider documentation

## What the source says

"This list constraint defines the set of Compute Engine VM instances that are allowed to use external IPv4 addresses." (read 10 Nov 2026).

On what it breaks: "This constraint doesn't restrict the use of IPv6 addresses."

## Related guardrails

- [Deny disabling block public access for AMIs](/guardrails/aws-scp-deny-disable-ami-block-public-access/): AWS, Service control policies (SCPs), public exposure
- [Require IAM authentication on Lambda function URLs](/guardrails/aws-scp-require-lambda-url-iam-auth/): AWS, Service control policies (SCPs), public exposure
- [Deny changes to S3 Block Public Access at bucket level](/guardrails/aws-rcp-deny-bucket-public-access-block-changes/): AWS, Resource control policies (RCPs), public exposure
- [Enforce public access prevention on Cloud Storage](/guardrails/gcp-orgpolicy-storage-public-access-prevention/): Google Cloud, Organization Policy Service (managed and legacy constraints), public exposure
- [Restrict public IP access on Cloud SQL instances](/guardrails/gcp-orgpolicy-sql-restrict-public-ip/): Google Cloud, Organization Policy Service (managed and legacy constraints), public exposure

## Related pages

- [Skip default network creation (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-skip-default-network/)
- [Restrict VPC peering usage (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-restrict-vpc-peering/)
- [Require predefined policies for VPC flow logs (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-require-vpc-flow-logs/)

## Sources

- Define allowed external IPs for VM instances: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints (read 10 Nov 2026)
- How to test it first: https://cloud.google.com/resource-manager/docs/organization-policy/dry-run-policy (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/gcp-orgpolicy-vm-external-ip-access/
