Back to controls

Ensure that IP forwarding is not enabled on Instances

Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets.

Category

Controls

Medium

Applies to

Google Cloud

Coverage

1 queries

Asset types

1 covered

Overview

Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets.

Forwarding of data packets should be disabled to prevent data loss or information disclosure.

Rationale

Compute Engine instance cannot forward a packet unless the source IP address of the packet matches the IP address of the instance. Similarly, GCP won't deliver a packet whose destination IP address is different than the IP address of the instance receiving the packet. However, both capabilities are required if you want to use instances to help route packets. To enable this source and destination IP check, disable the canIpForward field, which allows an instance to send and receive packets with non-matching destination or source IPs.

Remediation guidance

Using Console

  1. Go to the Compute Engine
  2. Go to VM Instances
  3. Select the VM Instance.
  4. Click Delete button.

**Via CLI gcloud **

gcloud compute instances delete ``

As you can only set the canIpForward field at instance creation time. After an instance is created, the field becomes read-only. Therefore delete the VM instance where canIpForward is set to true.

And create a new VM Instance with IP forwarding is set to Off

  1. Go to Compute Engine
  2. Click the Create instance button.
  3. Click Management, disk, networking, SSH keys.
  4. Click Networking.
  5. Click on the specific Network interfaces
  6. Ensure IP forwarding is set to off.
  7. Specify any other instance parameters you desire.
  8. Click Create.

Impact

Deleting instance(s) acting as routers/packet forwarders may break the network connectivity.

References

  1. https://cloud.google.com/compute/docs/networking#canipforward

Notes

You can only set the canIpForward field at instance creation time. After an instance is created, the field becomes read-only.

Service-wide remediation

Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.

Google Cloud

Use organization or folder policies where available, shared project templates, logs and alerting baselines, and IaC modules so new resources inherit the secure setting.

Operational rollout

  1. Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
  2. Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
  3. Re-scan and track approved exceptions with an owner and expiry date.

Query logic

These are the stored checks tied to this control.

IP forwarding is not enabled on Instances

Connectors

Google Cloud

Covered asset types

VM

Expected check: eq []

vms(where:{canIPForward:true}){...AssetFragment}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon