Control: 7.1.1.7 Ensure that virtual network flow logs are captured and sent to Log Analytics
Description
Ensure that virtual network flow logs are captured and fed into a central log analytics workspace.
Virtual network flow logs provide critical visibility into traffic patterns. Sending logs to a Log Analytics workspace enables centralized analysis, correlation, and alerting for faster threat detection and response.
Remediation
From Azure Portal
- Go to
Network Watcher
. - Under
Logs
, clickFlow logs
. - Click
+ Create
. - Select a subscription.
- Next to
Flow log type
, selectVirtual network
. - Click
+ Select target resource
. - Select
Virtual network
. - Select a virtual network.
- Click
Confirm selection
. - Select a storage account, or create a new storage account.
- Set the retention in days for the storage account.
- Click
Next
. - Under
Analytics
, forFlow logs version
, selectVersion 2
. - Check the box next to
Enable traffic analytics
. - Select a processing interval.
- Select a
Log Analytics Workspace
. - Click
Next
. - Optionally, add
Tags
. - Click
Review + create
. - Click
Create
. - Repeat steps 1-20 for each subscription or virtual network requiring remediation.
Usage
Run the control in your terminal:
powerpipe control run azure_compliance.control.cis_v400_7_1_1_7
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run azure_compliance.control.cis_v400_7_1_1_7 --share
SQL
This control uses a named query:
select id as resource, 'info' as status, 'Manual verification required.' as reason, display_name as subscriptionfrom azure_subscription;