🛡️ Google GCE Subnetwork Flow Logs are not enabled🟢
- Contextual name: 🛡️ GCE Subnetwork Flow Logs are not enabled🟢
- ID:
/ce/ca/google/vpc/subnetwork-flow-logs - Tags:
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Stats
not available
Logic
Similar Policies
- Cloud Conformity: Enable VPC Flow Logs for VPC Subnets
Description
Description
This policy checks whether VPC Flow Logs are enabled and configured correctly for Google Cloud GCE subnetworks that support flow logging. VPC Flow Logs capture information about IP traffic going to and from network interfaces in a subnet and make that data available in Cloud Logging.
Rationale
VPC Flow Logs provide visibility into network traffic for resources inside a subnet. They support network monitoring, traffic analysis, network forensics, and security investigations. Logging all traffic with detailed intervals, complete metadata, full sampling, and no filter helps preserve the context needed to investigate suspicious or unexpected activity.
Impact
Enabling VPC Flow Logs can increase Cloud Logging, BigQuery, or Pub/Sub costs depending on the configured sinks and retained log volume.
Audit
This policy flags a Google GCE Subnetwork as
INCOMPLIANTwhen itsPurposeisPRIVATEand any of the following conditions are met:
Flow Logsis not set to Enabled.Log Config Stateis not set to Enabled.... see more
Remediation
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 detailspage displays.- Click the
EDITbutton.- Set
Flow LogstoOn.- Expand the
Configure Logssection.- Set
Aggregation Intervalto5 SEC.- Check the box beside
Include metadata.- Set
Sample rateto100.- 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