Remediation
From Azure Portalβ
- Click on
Bastions
. - Select the
Subscription
. - Select the
Resource group
. - Type a
Name
for the new Bastion host. - Select a
Region
. - Choose
Standard
next toTier
. - Use the slider to set the
Instance count
. - Select the
Virtual network
orCreate new
. - Select the
Subnet
namedAzureBastionSubnet
. Create aSubnet
namedAzureBastionSubnet
using a/26
CIDR range if it doesn't already exist. - Selct the appropriate
Public IP address
option. - If
Create new
is selected for thePublic IP address
option, provide aPublic IP address name
. - If
Use existing
is selected forPublic IP address
option, select an IP address fromChoose public IP address
. - Click
Next: Tags >
. - Configure the appropriate
Tags
. - Click
Next: Advanced >
. - Select the appropriate
Advanced
options. - Click
Next: Review + create >
. - Click
Create
.
From Azure CLIβ
az network bastion create --location <location> --name <name of bastion host> --public-ip-address <public IP address name or ID> --resource-group <resource group name or ID> --vnet-name <virtual network containing subnet called "AzureBastionSubnet"> --scale-units <integer> --sku Standard --disable-copy-paste true|false --enable-ip-connect true|false --enable-tunneling true|false
From PowerShellβ
Create the appropriate Virtual network
settings and Public IP Address
settings:
$subnetName = "AzureBastionSubnet" $subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix <IP address range in CIDR notation making sure to use a /26> $virtualNet = New-AzVirtualNetwork -Name <virtual network name> -ResourceGroupName <resource group name> -Location <location> -AddressPrefix <IP address range in CIDR notation> -Subnet $subnet $publicip = New-AzPublicIpAddress -ResourceGroupName <resource group name> -Name <public IP address name> -Location <location> -AllocationMethod Dynamic -Sku Standard
Create the Azure Bastion
service using the information within the created variables from above:
New-AzBastion -ResourceGroupName <resource group name> -Name <bastion name> -PublicIpAddress $publicip -VirtualNetwork $virtualNet -Sku "Standard" -ScaleUnit <integer>