Skip to content

Commit 4017c33

Browse files
Merge pull request #312315 from asudbring/tsk556106-sfi-bastion
SFI security updates for diagnose-vm-network-routing-problem-cli.md
2 parents ae911af + b856ab8 commit 4017c33

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

articles/network-watcher/diagnose-vm-network-routing-problem-cli.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,38 @@ In this article, you learn how to use Azure Network Watcher [next hop](network-w
2626

2727
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. This article requires the Azure CLI version 2.0 or later. Run [az --version](/cli/azure/reference-index#az-version) command to find the installed version. If you run Azure CLI locally, sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
2828

29-
## Create a virtual machine
29+
## Create a resource group
3030

31-
Before you can create a VM, you must create a resource group to contain the VM. Create a resource group with [az group create](/cli/azure/group#az-group-create). The following example creates a resource group named *myResourceGroup* in the *eastus* location:
31+
Create a resource group with [az group create](/cli/azure/group#az-group-create). The following example creates a resource group named *myResourceGroup* in the *eastus* location:
3232

3333
```azurecli-interactive
3434
az group create --name myResourceGroup --location eastus
3535
```
3636

37-
Create a VM with [az vm create](/cli/azure/vm#az-vm-create). If SSH keys do not already exist in a default key location, the command creates them. To use a specific set of keys, use the `--ssh-key-value` option. The following example creates a VM named *myVm*:
37+
## Create a network security group
38+
39+
Create a network security group with [az network nsg create](/cli/azure/network/nsg#az-network-nsg-create). The default rules in the network security group block all inbound access from the internet.
40+
41+
```azurecli-interactive
42+
az network nsg create \
43+
--resource-group myResourceGroup \
44+
--name myNSG
45+
```
46+
47+
> [!NOTE]
48+
> The default rules of the network security group block all inbound access from the internet, including SSH. To connect to the virtual machine, use Azure Bastion. For more information, see [Quickstart: Deploy Azure Bastion with default settings](../bastion/quickstart-host-portal.md).
49+
50+
## Create a virtual machine
51+
52+
Create a VM with [az vm create](/cli/azure/vm#az-vm-create). The following example creates a VM named *myVm*. If SSH keys don't already exist in a default key location, the command creates them.
3853

3954
```azurecli-interactive
4055
az vm create \
4156
--resource-group myResourceGroup \
4257
--name myVm \
4358
--image Ubuntu2204 \
59+
--nsg myNSG \
60+
--public-ip-address "" \
4461
--generate-ssh-keys
4562
```
4663

0 commit comments

Comments
 (0)