Description
Network Security Group Flow Logs should be enabled and the retention period set to greater than or equal to 90 days.
Rationaleβ
Flow logs enable capturing information about IP traffic flowing in and out of network security groups. Logs can be used to check for anomalies and give insight into suspected breaches.
Impactβ
This will keep IP traffic logs for longer than 90 days. As a level 2, first determine your need to retain data, then apply your selection here. As this is data stored for longer, your monthly storage costs will increase depending on your data use.
Auditβ
From Azure Portalβ
- Go to
Network Watcher
. - Select
NSG flow logs
blade in the Logs section. - Select each Network Security Group from the list.
- Ensure
Status
is set toOn
. - Ensure
Retention (days)
settinggreater than 90 days
.
From Azure CLIβ
az network watcher flow-log show --resource-group <resourceGroup> --nsg <NameorID of the NetworkSecurityGroup> --query 'retentionPolicy'
Ensure that enabled
is set to true
and days
is set to greater then or equal to 90
.
From Azure Policyβ
If referencing a digital copy of this Benchmark, clicking a Policy ID will open a link to the associated Policy definition in Azure.
- Policy ID: 5e1cd26a-5090-4fdb-9d6a-84a90335e22d - Name:
Configure network security groups to use specific workspace, storage account and flowlog retention policy for traffic analytics
Default Valueβ
By default, Network Security Group Flow Logs are disabled
.
Referencesβ
- https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview
- https://docs.microsoft.com/en-us/cli/azure/network/watcher/flow-log?view=azure-cli-latest
- https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-logging-threat-detection#lt-6-configure-log-storage-retention