Skip to content

Commit a17350f

Browse files
committed
fixes
1 parent 07618a0 commit a17350f

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

articles/virtual-network/tutorial-filter-network-traffic.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ az network vnet subnet create \
129129
--vnet-name vnet-1 \
130130
--resource-group test-rg \
131131
--name subnet-1 \
132-
--address-prefix 10.0.0.0/24 \
133-
--network-security-group nsg-1
132+
--address-prefix 10.0.0.0/24
134133
```
135134

136135
---
@@ -667,7 +666,7 @@ The virtual machine takes a few minutes to create. Don't continue with the next
667666

668667
Create two VMs in the virtual network so you can validate traffic filtering in a later step.
669668

670-
Create a VM with [az vm create](/cli/azure/vm). The following example creates a VM that serves as a web server. The `--asgs asg-web` option causes Azure to make the network interface it creates for the VM a member of the *asg-web* application security group. The `--nsg ""` option is specified to prevent Azure from creating a default network security group for the network interface Azure creates when it creates the VM. The command prompts you to create a password for the VM. SSH keys aren't used in this example to facilitate the later steps in this article. In a production environment, use SSH keys for security.
669+
Create a VM with [az vm create](/cli/azure/vm). The following example creates a VM that serves as a web server. The `--nsg ""` option is specified to prevent Azure from creating a default network security group for the network interface Azure creates when it creates the VM. The command prompts you to create a password for the VM. SSH keys aren't used in this example to facilitate the later steps in this article. In a production environment, use SSH keys for security.
671670

672671
```azurecli-interactive
673672
az vm create \
@@ -697,7 +696,7 @@ The VM takes a few minutes to create. After the VM is created, output similar to
697696
}
698697
```
699698

700-
Create a VM with [az vm create](/cli/azure/vm). The following example creates a VM that serves as a management server. The `--asgs asg-mgmt` option causes Azure to make the network interface it creates for the VM a member of the *asg-mgmt* application security group.
699+
Create a VM with [az vm create](/cli/azure/vm). The following example creates a VM that serves as a management server.
701700

702701
The following example creates a VM and adds a user account. The `--generate-ssh-keys` parameter causes the CLI to look for an available ssh key in `~/.ssh`. If one is found, that key is used. If not, one is generated and stored in `~/.ssh`. Finally, we deploy the latest `Ubuntu 22.04` image.
703702

@@ -793,10 +792,11 @@ Use [az network nic update](/cli/azure/network/nic) to associate the network int
793792
nic_name=$(az vm show --resource-group test-rg --name vm-web --query 'networkProfile.networkInterfaces[0].id' -o tsv | xargs basename)
794793
795794
# Associate the application security group with the network interface
796-
az network nic update \
797-
--resource-group test-rg \
798-
--name $nic_name \
799-
--application-security-groups asg-web
795+
az network nic ip-config update \
796+
--name ipconfigvm-web \
797+
--nic-name $nic_name \
798+
--resource-group test-rg \
799+
--application-security-groups asg-web
800800
```
801801

802802
Repeat the command to associate the *asg-mgmt* application security group with the *vm-mgmt-nic* network interface.
@@ -806,10 +806,11 @@ Repeat the command to associate the *asg-mgmt* application security group with t
806806
nic_name=$(az vm show --resource-group test-rg --name vm-mgmt --query 'networkProfile.networkInterfaces[0].id' -o tsv | xargs basename)
807807
808808
# Associate the application security group with the network interface
809-
az network nic update \
810-
--resource-group test-rg \
811-
--name $nic_name \
812-
--application-security-groups asg-mgmt
809+
az network nic ip-config update \
810+
--name ipconfigvm-mgmt \
811+
--nic-name $nic_name \
812+
--resource-group test-rg \
813+
--application-security-groups asg-mgmt
813814
```
814815

815816
---
@@ -922,7 +923,7 @@ To confirm that you can access the _vm-web_ web server from outside of Azure, op
922923

923924
### [CLI](#tab/cli)
924925

925-
Using an SSH client of your choice, connect to the VMs created previously. For example, the following command can be used from a command line interface such as [Windows Subsystem for Linux](/windows/wsl/install) to create an SSH session with the *vm-mgmt* VM. In the previous steps, we enabled Microsoft Entra ID sign-in for the VMs. You can sign-in to the virtual machines using your Microsoft Entra ID credentials or you can use the SSH key that you used to create the VMs. In the following example, we use the SSH key to sign in to management VM and then sign in to the web VM from the management VM with a password.
926+
Using an SSH client of your choice, connect to the VMs created previously. For example, the following command can be used from a command line interface such as [Windows Subsystem for Linux](/windows/wsl/install) to create an SSH session with the *vm-mgmt* VM. You can sign-in to the virtual machines using your Microsoft Entra ID credentials or you can use the SSH key that you used to create the VMs. In the following example, we use the SSH key to sign in to management VM and then sign in to the web VM from the management VM with a password.
926927

927928
For more information about how to SSH to a Linux VM and sign in with Microsoft Entra ID, see [Sign in to a Linux virtual machine in Azure by using Microsoft Entra ID and OpenSSH](/entra/identity/devices/howto-vm-sign-in-azure-ad-linux).
928929

0 commit comments

Comments
 (0)