Remediation
From Google Cloud Consoleβ
- Go to the VPC network GCP Console visiting https://console.cloud.google.com/networking/networks/list
- Click the name of a subnet, The
Subnet details
page displays. - Click the
EDIT
button. - Set
Flow Logs
toOn
. - Expand the
Configure Logs
section. - Set
Aggregation Interval
to5 SEC
. - Check the box beside
Include metadata
. - Set
Sample rate
to100
. - Click
Save
.
Noteβ
It is not possible to configure a Log filter from the console.
From Google Cloud CLIβ
To enable VPC Flow Logs for a network subnet, run the following command:
gcloud compute networks subnets update [SUBNET_NAME] --region [REGION] --enable-flow-logs --logging-aggregation-interval=interval-5-sec --logging-flow-sampling=1 --logging-metadata=include-all