Check the VM's own firewall and app
vm-client can't open the site on vm-web at 443.
- Let vm-client open the site on vm-web (443)
- Keep UFW running on vm-webbroken
- Keep SSH from vm-client to vm-web blockedbroken
vm-client can't open the site on vm-web at 443. There's no NSG and no route table anywhere in vnet-app, so Azure isn't filtering anything. Find out what's stopping it inside the VM. SSH to vm-web is for subnet-admin only, so vm-client must not get it.
Test the connection from Azure's side. Look at the issue type on the last hop.
az network watcher test-connectivity -g rg-lab --source-resource vm-client --dest-address 10.1.1.4 --dest-port 443What's this?
Tests a real connection from a VM to a destination and reports whether it works, each hop on the way, and the issue that stops it.
-gthe resource group the resources live in--source-resourcethe VM the test starts from--dest-addressthe IP or name to reach--dest-portthe port to reach
GuestFirewall: the VM itself dropped it. Look inside with Run command.
az vm run-command invoke -g rg-lab -n vm-web --command-id RunShellScript --scripts "ufw status numbered"What's this?
Runs a script inside a VM through the VM agent, without logging in to it.
-gthe resource group the resources live in-nthe name of the thing to look at or change
--command-id RunShellScriptrun your own shell script--scriptsthe script, run as root by the VM agent
Only SSH from the admin subnet is allowed. Allow 443 from the client subnet, nothing more.
az vm run-command invoke -g rg-lab -n vm-web --command-id RunShellScript --scripts "ufw allow from 10.1.2.0/24 to any port 443 proto tcp"What's this?
Runs a script inside a VM through the VM agent, without logging in to it.
-gthe resource group the resources live in-nthe name of the thing to look at or change
Test again. The issue changes.
az network watcher test-connectivity -g rg-lab --source-resource vm-client --dest-address 10.1.1.4 --dest-port 443 --protocol TcpWhat's this?
Tests a real connection from a VM to a destination and reports whether it works, each hop on the way, and the issue that stops it.
-gthe resource group the resources live in--source-resourcethe VM the test starts from--dest-addressthe IP or name to reach--dest-portthe port to reach--protocolTCP or UDP
NoListenerOnDestination: the firewall lets it in, but nothing answers. See what's listening, and the web server's state.
az vm run-command invoke -g rg-lab -n vm-web --command-id RunShellScript --scripts "ss -tlnp && systemctl status nginx"What's this?
Runs a script inside a VM through the VM agent, without logging in to it.
-gthe resource group the resources live in-nthe name of the thing to look at or change
Start the web server.
az vm run-command invoke -g rg-lab -n vm-web --command-id RunShellScript --scripts "systemctl start nginx"What's this?
Runs a script inside a VM through the VM agent, without logging in to it.
-gthe resource group the resources live in-nthe name of the thing to look at or change
Answer the question below.
Sources on Microsoft Learn (5)
?
- 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: not workingvm-client → vm-web:22should stay blocked: blocked