QuestionQ277

VerifiedImplement and manage virtual networking

You have an Azure subscription that contains 20 virtual machines, a network security group (NSG) named NSG1, and two peered virtual networks named VNET1 and VNET2.

NSG1 is associated with the subnets that contain the virtual machines. The virtual machines run Linux.

You plan to deploy an Azure Bastion Basic SKU host named Bastion1 to VNET1.

You need to configure NSG1 to permit inbound access to the virtual machines through Bastion1.

Which port should you configure for the inbound security rule?

Explanation

Users connect to Azure Bastion over HTTPS (TCP 443), and Bastion then connects to the target virtual machines over their private IP addresses by using RDP (3389) or SSH (22). An NSG on the target VM subnets must allow this RDP/SSH traffic inbound from the AzureBastionSubnet. NSG1 is associated with the VM subnets and the VMs run Linux, so the inbound rule must allow TCP 22 (SSH), ideally scoped to the AzureBastionSubnet address range. Port 443 (from Internet and GatewayManager) and ports 8080/5701 are needed only on an NSG associated with the AzureBastionSubnet itself, and the Basic SKU doesn't support custom ports, so the default port 22 applies. Port 389 isn't among the ports Bastion requires.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!