Microsoft Docs

Azure | Networking | Network Watcher

Troubleshooting IP Flow with Network Watcher

Diagnose and resolve network traffic flow issues in Azure.

Introduction to IP Flow Verification

Azure Network Watcher provides a comprehensive set of tools to monitor, diagnose, and troubleshoot network performance and health for Azure deployments. IP Flow Verification is a powerful feature within Network Watcher that helps you analyze traffic flow from or to a virtual machine (VM) in Azure. It allows you to determine if traffic is allowed or denied to or from your VM, and if denied, which security rule is causing the denial.

When to Use IP Flow Verification

How IP Flow Verification Works

IP Flow Verification sends a test packet from a source IP address to a destination IP address and port. It then checks the flow of this packet through the Azure network, considering:

The tool reports whether the traffic is allowed or denied and, if denied, it provides the name of the specific security rule responsible.

Steps to Use IP Flow Verification

  1. Navigate to Network Watcher: In the Azure portal, search for "Network Watcher" and select it.
  2. Select IP Flow Verification: Within Network Watcher, choose "IP Flow Verification" from the menu.
  3. Configure the Test:
    • Subscription and Resource Group: Select the appropriate subscription and resource group for your VM.
    • Virtual Machine: Choose the target virtual machine.
    • Direction: Select 'Inbound' if you are troubleshooting traffic coming *to* the VM, or 'Outbound' for traffic going *from* the VM.
    • Protocol: Choose the protocol (e.g., TCP, UDP, ICMP).
    • Source IP Address: Enter the IP address from which the traffic originates (for inbound) or the VM's IP (for outbound).
    • Source Port: Enter the source port (often '*' for any port).
    • Destination IP Address: Enter the IP address of the destination.
    • Destination Port: Enter the destination port.
  4. Run the Verification: Click the "Check" button to start the IP flow verification process.
  5. Analyze the Results: The results will indicate whether the flow is "Allowed" or "Denied." If denied, the tool will specify the name of the Network Security Group and the rule that caused the denial.
Important: IP Flow Verification uses the VM's primary private IP address for outbound tests and checks against NSGs applied to the VM's network interface and subnet.

Interpreting the Results

Allowed Flow

If the IP Flow Verification indicates that the traffic is "Allowed," it means that no NSG rules or other network configurations are blocking the traffic between the specified source and destination endpoints for the given protocol and port.

Denied Flow

When the flow is "Denied," you will see details about the specific rule responsible:

This information is crucial for quickly identifying and rectifying misconfigurations in your NSGs. You can then navigate to the identified NSG in the Azure portal and modify or remove the blocking rule, or add an exception if necessary.

Tip: For outbound traffic, ensure your NSGs allow egress traffic to the required destination ports and IPs. For inbound traffic, verify that your NSGs permit ingress traffic from the expected sources to the VM's IP and relevant ports.

Example: Troubleshooting Inbound Web Access

Let's say a web server running on an Azure VM is not accessible from the internet. You suspect an NSG is blocking inbound traffic.

Configuration:

Expected Result (Denied):

If the result shows "Denied" with a rule like "DenyAllInbound," you would need to create an inbound security rule to allow TCP traffic on port 80 from the appropriate source (e.g., 'Internet' or specific IP ranges).

Example NSG Rule (to be added):

## Inbound Security Rule for HTTP ##
Priority: 300
Name: AllowHTTPInbound
Source: Any
Source Port: *
Destination: Any
Destination Port: 80
Protocol: TCP
Action: Allow
            

Advanced Troubleshooting with Network Watcher

Beyond IP Flow Verification, Network Watcher offers other valuable tools such as:

Combining these tools provides a powerful suite for diagnosing and resolving complex network issues.