Home/Refreshers/Keep network records long enough to be useful: refresher
Keep network records long enough to be useful
Traffic records stored cheaply for months, in a format you can query.
Remember
- Traffic crosses the network: between hosts and out to the internet.
- A flow record is written: who talked to whom, when, and how much.
- Stored cheaply for months: in a format you can query.
- A scoping question answered: months after the fact.
| Platform | Uses | The part that catches people |
|---|---|---|
| AWS | VPC flow logs to S3 in Parquet format | With hour partitions on, files land under AWSLogs/aws-account-id=<id>/, and a bucket policy written for AWSLogs/<id>/ refuses them. |
| Azure | Virtual network flow logs with traffic analytics | A flow log must be written by the Network Watcher in the network's own region. |
| Google Cloud | VPC flow logs to a log bucket | Flow logs are a setting on each subnet, and this template does not manage your subnets. |
| Oracle Cloud | VCN flow logs to the Logging service | Logging keeps records for 180 days at most. |
Run the quick start
| Download providers | terraform init |
| Preview | terraform plan |
| Apply | terraform apply |
Watch out
- Flow logs answer the first questions of a network investigation: which hosts a compromised machine talked to, on which ports, and how much data left.
- Keep them longer than your other logs if you can.
Check it worked
Ask for traffic from a host thirty days ago and get rows back.