Interpret VNet flow logs

5.2 Network Traffic Monitoring and Analysis

📘Microsoft Azure Networking Solutions (AZ-700)


What are VNet Flow Logs?

  • VNet flow logs are records of network traffic flowing in and out of Azure Virtual Networks (VNets).
  • They are part of Azure Network Watcher, which is a tool that monitors, diagnoses, and gains insights into Azure networking.
  • VNet flow logs help you see which traffic is allowed, which is denied, and why, which is essential for security, troubleshooting, and compliance.

Where VNet Flow Logs Come From

  1. Flow logs are enabled on a Network Security Group (NSG).
  2. They capture the traffic for the network interfaces (NICs) that the NSG is associated with.
  3. Logs are stored in Azure Storage Accounts in a specific format (JSON) for analysis.

Key points for exam:

  • You cannot enable flow logs on a VNet directly; they must be enabled on an NSG.
  • Logs are exported to Storage Accounts, Event Hubs, or Log Analytics for further analysis.

What Information is in a VNet Flow Log

Each flow log entry contains several important fields. Understanding them is crucial for interpreting the logs.

FieldDescriptionExample in IT context
timeTimestamp of when the traffic was captured2026-03-03T12:15:23Z
sourceIPThe IP address initiating the traffic10.0.1.4 (a VM sending a request)
destinationIPThe IP address receiving the traffic10.0.2.5 (a VM receiving the request)
sourcePortPort on the source machine443 (HTTPS request from a VM)
destinationPortPort on the destination80 (HTTP service on a VM)
protocolTransport protocolTCP or UDP
flowStateWhether traffic was allowed or deniedAllow or Deny
flowDirectionDirection of trafficInbound or Outbound
trafficCategoryType of trafficNetworkSecurityGroup (filtered by NSG rules)

Exam tip: You should be able to identify whether a traffic flow was allowed or blocked, and which NSG rule caused it.


How to Interpret VNet Flow Logs

  1. Check Flow Direction
    • Inbound → traffic coming into a VM.
    • Outbound → traffic going out from a VM.
  2. Check Source and Destination
    • Identify which IP or subnet is sending/receiving traffic.
    • Helps to know if traffic is internal (within VNet) or external (internet).
  3. Check Allowed vs Denied Traffic
    • Flow logs will explicitly show if traffic was allowed or denied.
    • This helps verify NSG rules and identify misconfigurations.
  4. Check Ports and Protocols
    • Helps identify the service being used, e.g., 443 → HTTPS, 22 → SSH.
  5. Investigate Trends or Patterns
    • Frequent denied traffic from a specific IP may indicate a security threat.
    • Excessive outbound traffic to the internet may need monitoring or throttling.

Tools to Analyze Flow Logs

  • Azure Storage Explorer: Download logs and open JSON files.
  • Log Analytics / Azure Monitor: Run queries to analyze patterns.
  • Power BI: Visualize traffic flows and trends.
  • Third-party SIEM: Some companies send logs to tools like Splunk or Azure Sentinel for advanced analysis.

Exam focus: Know that flow logs can be sent to Storage Accounts, Event Hubs, or Log Analytics, and you should be familiar with basic Kusto Query Language (KQL) queries for analyzing logs in Log Analytics.


Practical IT Examples

  • Troubleshooting access issues:
    A developer reports they cannot connect to a database. By checking VNet flow logs, you see that traffic from the developer’s VM is denied by the NSG. You find the NSG rule blocking port 1433 (SQL).
  • Security monitoring:
    Suspicious traffic from an external IP is hitting your web servers. Flow logs show multiple denied inbound connections on port 22, indicating possible SSH brute-force attempts.
  • Compliance auditing:
    A company needs to prove only approved traffic flows in and out of VNets. Flow logs can provide a record of allowed and denied traffic for audits.

Exam Tips

  1. Know that VNet flow logs are NSG-based, JSON format, and can be sent to Storage, Event Hubs, or Log Analytics.
  2. Understand the key fields (sourceIP, destinationIP, flowState, direction, protocol, ports).
  3. Be able to read a flow log entry and explain whether traffic was allowed or denied.
  4. Know how to use Log Analytics or Storage Explorer for further analysis.
  5. Recognize common troubleshooting or security scenarios from the logs.

Summary Table for Quick Revision

TopicKey Point
Flow Log SourceEnabled on NSG, captures NIC traffic
StorageAzure Storage Account, Event Hub, Log Analytics
Data FormatJSON
Key FieldsSource/Destination IP, Ports, Protocol, FlowState, Direction
Use CasesTroubleshooting, Security Monitoring, Compliance
Analysis ToolsStorage Explorer, Log Analytics, Power BI, SIEM
Buy Me a Coffee