Description
canIpForward lets a Compute Engine VM send and receive packets for addresses not assigned to it. The guest OS and network routes must also be configured for packets to pass through the VM.
Potential impact
An unnecessary forwarding path can carry traffic across an unintended network boundary.
Remediation
Check which routes use the VM as their next hop. Set canIpForward to false on ordinary VMs. For a router or security appliance, restrict guest forwarding, routes and firewall rules to the traffic it must carry, then test the required paths.
Examples
Standard support for Deployment Manager has ended. These fragments show only the forwarding property. Use supported tooling to select the actual VM. For a new VM, also supply the machine type, disk and zone.
Before
resources:
- name: vm-template
type: compute.v1.instance
properties:
canIpForward: true
After
resources:
- name: vm-template
type: compute.v1.instance
properties:
canIpForward: false