Check effective rules and test traffic (IP flow verify)

Azure Portal, Hands On10 minutesLook onlySteps checked 28 October 2026By Cloud Hands On

In this task you'll test whether network traffic to a VM is allowed.

When a connection to a VM fails, the first question is: is the network blocking it? Effective security rules show the combined rules from every NSG that applies to a VM, and IP flow verify tests one packet and tells you which rule allowed or blocked it.

Both live in Network Watcher, which Azure turns on automatically in each region you use. You need a running VM to test, such as the one from section 7.

Example. Ironbridge Payments' new API server can't be reached on port 8443. IP flow verify shows the packet is denied by the default rule, because the NSG only allows 443. Adding one rule fixes it.

Before you start

You need: Network Contributor on the VM's resource group. Time: 10 minutes.

Where to look

  1. Home
  2. Network Watcher
  3. IP flow verify

Steps

  1. Make sure a VM is running, such as vm-practice from section 7.If you deleted it, create it again (free-eligible B1s) and delete the group afterwards.
  2. Search for network watcher and open Network Watcher.
  3. Select Effective security rules, pick the Resource group, the Virtual machine and its Network interface, then read the combined inbound rules for each network security group listed.
  4. Select IP flow verify. Choose the Virtual machine, then its Network interface (it isn't picked for you). Keep Protocol on TCP and Direction on Inbound, set Local port to 22, Remote IP address to 203.0.113.5 and Remote port to 60000.Local IP address is the VM's private IP. It fills in by itself once you pick the network interface.
  5. Select Verify IP flow and scroll down to Results: Access allowed or Access denied, with the Security Rule that decided it and its network security group.
  6. Change the local port to 3389 and verify again. This time it's denied by the default rule DenyAllInBound.This tells you the NSG is the cause, not the VM itself.

Tip. IP flow verify is under Network diagnostic tools in Network Watcher's left menu.

Commands

# Would inbound SSH from this address reach the VM?
az network watcher test-ip-flow --resource-group rg-portal-practice --vm vm-practice \
  --direction Inbound --protocol TCP --local 10.0.0.4:22 --remote 203.0.113.5:60000

# The combined rules on the VM's network card
az network nic list-effective-nsg --resource-group rg-portal-practice --name <nic name>

Watch out for

Cost
These checks are free. The VM you test against is billed as usual, so stop or delete it afterwards.
Security
These tools only read and test; they don't change any rules. Use them before opening ports, so you only open what's really needed.
Common mistakes
Testing a stopped VM, which isn't allowed. Forgetting that an allowed result only covers the NSGs: the app on the VM, or its own firewall, can still refuse the connection.

Clean up

Nothing to clean up for the checks. Stop or delete the test VM when you've finished.

Words to know

Network Watcher
Azure's set of tools for checking and troubleshooting networks.
Effective security rules
The final list of rules that really apply to a VM, after combining its subnet and network card NSGs.
IP flow verify
A test that says whether one packet would be allowed or denied, and by which rule.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going