using network watcher to quickly diagnose VM connection issue
To verify flow connectivity from VM to bing or external internet
az network watcher test-ip-flow --direction 'outbound' --protocol 'TCP' --local '10.0.0.4:60000' --remote '13.107.21.200:80' --vm 'myVM' --nic 'myVmVMNic' --resource-group 'myResourceGroup' --out 'table'
To verify flow from another remote VM or IP
az network watcher test-ip-flow --direction 'inbound' --protocol 'TCP' --local '10.0.0.4:80' --remote '10.10.10.10:6000' --vm 'myVM' --nic 'myVmVMNic' --resource-group 'myResourceGroup' --out 'table'
Then you may want to see what NSG rules might be applied.
az network nic list-effective-nsg --resource-group 'myResourceGroup' --name 'myVmVMNic'
Please note that this only applies for VM. It won't be able to do it for kubernetes cluster. If you're trying to troubleshoot for kubernetes cluster you can use packet capture and connection troubleshoot. Connection troubleshoot will require a destination vm.
Comments