Deploy Azure Bastion
Your tasks
- Get Bastion bas-hub reaching vm-app on 22
Admins should SSH to vm-app in vnet-hub without it having a public IP. AzureBastionSubnet (10.0.7.0/26) and a Standard public IP, pip-bastion, are ready, and nsg-app already allows 22 from the Bastion subnet. Deploy Bastion bas-hub.
You'll learn
Azure Bastion
Deploy Bastion.
az network bastion create -g rg-lab --name bas-hub --vnet-name vnet-hub --public-ip-address pip-bastion --sku BasicWhat's this?
Creates Azure Bastion, which lets you reach VMs over SSH or RDP without exposing them to the internet. It needs its own subnet named AzureBastionSubnet.
-gthe resource group the resources live in--namethe name of the thing to look at or change--vnet-namethe virtual network
--vnet-name vnet-hubthe VNet that has AzureBastionSubnet--sku BasicBasic, Standard, Premium or Developer
Check that vm-app lets Bastion in on 22.
az network watcher test-ip-flow -g rg-lab --vm vm-app --direction Inbound --protocol TCP --local 10.0.1.4:22 --remote 10.0.7.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)
Answer the question below.
Sources on Microsoft Learn (2)
0/1 changes
Network map
?
- 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.
Goals 0/2
Cloud Shell · bashVMsrg-lab · eastus2
cloudshell:~$