TMAegis
gcp のその他のルール

TMA-GCP-4.6

Ensure That IP Forwarding Is Not Enabled on Instances

高レベル 1手動レビューgcp

説明

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. 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, w...

チェック方法

監査方法: 手動レビュー

この推奨事項は自動ではチェックできません。--include-manual を指定すると、スキャン結果にこの手順付きで一覧表示されます。

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)' 2. 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-".

修正方法

修正方法: ガイダンスまたは IaC パッチ

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> NoteReplace 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. 2. Use a text editor to modify this file Replace canIpForward: true with canIpForward: false 3. 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.

プロパティ

オペレーティングシステム
すべて
タグ
cloudgcp
参照
CIS Google Cloud Platform Foundation Benchmark v5.0.0 - 4.6 Ensure That IP Forwarding Is Not Enabled on Instances