Find the blocking rule with IP flow verify
vm-client can't open the HTTPS site on vm-web.
- Run IP flow verify against vm-web
- Let vm-client reach vm-web on 443
- Keep SSH (22) from vm-client to vm-web blockedbroken
vm-client (10.1.2.4, in subnet-client) can't reach the HTTPS site on vm-web (10.1.1.4, in subnet-web). subnet-web has nsg-web attached. Instead of guessing, ask Network Watcher which rule is blocking it, then add a rule to nsg-web that allows only HTTPS (port 443) from subnet-client. SSH (port 22) must stay blocked.
Test an inbound TCP packet to vm-web on 443 from vm-client.
az network watcher test-ip-flow -g rg-lab --vm vm-web --direction Inbound --protocol TCP --local 10.1.1.4:443 --remote 10.1.2.4:*What's this?
Checks whether one packet is allowed or denied to or from a VM, and names the security rule that decided. Use it for security rule problems.
-gthe resource group the resources live in--vmthe virtual machine to test from--directionInbound for traffic coming in to the VM, Outbound for traffic leaving it--protocolTCP or UDP--localthe VM's own IP and port--remotethe other side's IP and port (* means any port)
--vm vm-webthe VM to test--direction Inboundtraffic coming into the VM--local 10.1.1.4:443the VM's own IP and port--remote 10.1.2.4:*the other side, any source port
Answer below with the rule name that comes after securityRules/.
Add an allow rule for HTTPS from subnet-client at a lower priority number than the deny.
az network nsg rule create -g rg-lab --nsg-name nsg-web --name Allow-HTTPS-Client --priority 300 --direction Inbound --access Allow --protocol Tcp --source-address-prefixes 10.1.2.0/24 --destination-port-ranges 443What's this?
Adds or changes one rule in a network security group (NSG). Rules are checked from the lowest priority number up, and the first match decides.
-gthe resource group the resources live in--nsg-namethe network security group the rule is in--namethe name of the thing to look at or change--prioritywhere the rule sits in the order. Lower numbers are checked first--directionInbound for traffic coming in to the VM, Outbound for traffic leaving it--accessAllow or Deny--protocolTCP or UDP--source-address-prefixeswhich source addresses the rule matches--destination-port-rangeswhich ports the rule matches
--priority 300runs before the deny at 4000--source-address-prefixes 10.1.2.0/24only subnet-client--destination-port-ranges 443only HTTPS
Run the same test again and see the new verdict.
az network watcher test-ip-flow -g rg-lab --vm vm-web --direction Inbound --protocol TCP --local 10.1.1.4:443 --remote 10.1.2.4:*What's this?
Checks whether one packet is allowed or denied to or from a VM, and names the security rule that decided. Use it for security rule problems.
-gthe resource group the resources live in--vmthe virtual machine to test from--directionInbound for traffic coming in to the VM, Outbound for traffic leaving it--protocolTCP or UDP--localthe VM's own IP and port--remotethe other side's IP and port (* means any port)
?
- Resource group, the outer dashed frame
- Virtual network, with its address space top right
- Subnet, with range and usable IPs (5 reserved)
- Network security group. A small shield on a VM's NIC means the NIC has one too
- Route table on the subnet
- VM Appliance Private endpoint
- Peering Connected Initiated or access off
- Goal working Goal broken, X marks where it stops
- Private DNS zone, dotted lines go to linked VNets
- Orange pulse: what your last command changed. Drag to pan, Ctrl and scroll to zoom.
vm-client → vm-web:443should work: blocked by a network security groupvm-client → vm-web:22should stay blocked: blocked, as it should be