cyberstrikeus/cyberstrike/cis-gcp-foundations-4-6

Claude Code and agent skill by cyberstrikeus/cyberstrike

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Ensure That IP Forwarding Is Not Enabled on Instances

Install

npx vskill@latest install cyberstrikeus/cyberstrike/cis-gcp-foundations-4-6

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as cyberstrikeus/cyberstrike/cis-gcp-foundations-4-6.

4.6 Ensure That IP Forwarding Is Not Enabled on Instances (Automated)

Profile Applicability

  • Level 1

Description

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.

Audit

From Google Cloud Console
  1. Go to the VM Instances page by visiting: https://console.cloud.google.com/compute/instances.
  2. For every instance, click on its name to go to the VM instance details page.
  3. Under the Network interfaces section, ensure that IP forwarding is set to Off for every network interface.
From Google Cloud CLI
  1. List all instances:
gcloud compute instances list --format='table(name,canIpForward)'
  1. Ensure that CAN_IP_FORWARD column in the output of above command does not contain True for any VM instance.

Exception

Instances created by GKE should be excluded because they need to have IP forwarding enabled and cannot be changed. Instances created by GKE have names that start with "gke-".

Remediation

You only edit the canIpForward setting at instance creation or using CLI.

From Google Cloud CLI
  1. Use the instances export command to export the existing instance properties:
gcloud compute instances export <INSTANCE_NAME> \
--project <PROJECT_ID> \
--zone <ZONE> \
--destination=<FILE_PATH>

Note: Replace the following:

  • INSTANCE_NAME the name for the instance that you want to export.
  • PROJECT_ID: the project ID for this request.
  • ZONE: the zone for this instance.
  • FILE_PATH: the output path where you want to save the instance configuration file on your local workstation.
  1. Use a text editor to modify this file. Replace canIpForward: true with canIpForward: false.
  1. Run this command to import the file you just modified:
gcloud compute instances update-from-file INSTANCE_NAME \
--project PROJECT_ID \
--zone ZONE \
--source=FILE_PATH \
--most-disruptive-allowed-action=REFRESH

If the update request is valid and the required resources are available, the instance update process begins. You can monitor the status of this operation by viewing the audit logs. This update requires only a REFRESH not a full restart.

Default Value

By default, instances are not configured to allow IP forwarding.

References

  1. https://cloud.google.com/vpc/docs/using-routes#canipforward
  2. https://cloud.google.com/compute/docs/instances/update-instance-properties

Additional Information

You can only set the canIpForward field at instance creation time or using CLI.

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v84.4 Implement and Manage a Firewall on ServersXXX
v84.5 Implement and Manage a Firewall on End-User DevicesXXX
v711.1 Maintain Standard Security Configurations for Network DevicesXX
v711.2 Document Traffic Configuration RulesXX

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2,916
Repository forks
458
7-day trend score
40

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cyberstrikeus/cyberstrike/cis-gcp-foundations-4-6/badge)](https://verified-skill.com/skills/cyberstrikeus/cyberstrike/cis-gcp-foundations-4-6)

Something wrong with this skill or its page? Tell us.