Skip to content

Commit 53ba78e

Browse files
committed
fixes
1 parent 8956e83 commit 53ba78e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ Create an application security group with [az network asg create](/cli/azure/net
202202
```azurecli-interactive
203203
az network asg create \
204204
--resource-group test-rg \
205-
--name asg-web-servers \
205+
--name asg-web \
206206
--location westus2
207207
208208
az network asg create \
209209
--resource-group test-rg \
210-
--name asg-mgmt-servers \
210+
--name asg-mgmt \
211211
--location westus2
212212
```
213213

@@ -439,7 +439,7 @@ Set-AzNetworkSecurityGroup -NetworkSecurityGroup $nsg
439439
440440
### [CLI](#tab/cli)
441441

442-
Create a security rule with [az network nsg rule create](/cli/azure/network/nsg/rule). The following example creates a rule that allows traffic inbound from the internet to the *asg-web-servers* application security group over ports 80 and 443:
442+
Create a security rule with [az network nsg rule create](/cli/azure/network/nsg/rule). The following example creates a rule that allows traffic inbound from the internet to the *asg-web* application security group over ports 80 and 443:
443443

444444
```azurecli-interactive
445445
az network nsg rule create \
@@ -452,11 +452,11 @@ az network nsg rule create \
452452
--priority 100 \
453453
--source-address-prefix Internet \
454454
--source-port-range "*" \
455-
--destination-asgs "asg-web-servers" \
455+
--destination-asgs "asg-web" \
456456
--destination-port-range 80 443
457457
```
458458

459-
The following example creates a rule that allows traffic inbound from the Internet to the *asg-mgmt-servers* application security group over port 22:
459+
The following example creates a rule that allows traffic inbound from the Internet to the *asg-mgmt* application security group over port 22:
460460

461461
```azurecli-interactive
462462
az network nsg rule create \
@@ -469,7 +469,7 @@ az network nsg rule create \
469469
--priority 110 \
470470
--source-address-prefix Internet \
471471
--source-port-range "*" \
472-
--destination-asgs "asg-mgmt-servers" \
472+
--destination-asgs "asg-mgmt" \
473473
--destination-port-range 22
474474
```
475475

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

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

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-servers` option causes Azure to make the network interface it creates for the VM a member of the *asg-web-servers* 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.
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.
671671

672672
```azurecli-interactive
673673
az vm create \
@@ -697,7 +697,7 @@ The VM takes a few minutes to create. After the VM is created, output similar to
697697
}
698698
```
699699

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-servers` option causes Azure to make the network interface it creates for the VM a member of the *asg-mgmt-servers* application security group.
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.
701701

702702
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.
703703

@@ -786,7 +786,7 @@ Set-AzNetworkInterface @params3
786786

787787
### [CLI](#tab/cli)
788788

789-
Use [az network nic update](/cli/azure/network/nic) to associate the network interface with the application security group. The following example associates the *asg-web-servers* application security group with the *vm-web-nic* network interface:
789+
Use [az network nic update](/cli/azure/network/nic) to associate the network interface with the application security group. The following example associates the *asg-web* application security group with the *vm-web-nic* network interface:
790790

791791
```azurecli-interactive
792792
# Retrieve the network interface name associated with the virtual machine
@@ -796,10 +796,10 @@ nic_name=$(az vm show --resource-group test-rg --name vm-web --query 'networkPro
796796
az network nic update \
797797
--resource-group test-rg \
798798
--name $nic_name \
799-
--application-security-groups asg-web-servers
799+
--application-security-groups asg-web
800800
```
801801

802-
Repeat the command to associate the *asg-mgmt-servers* application security group with the *vm-mgmt-nic* network interface.
802+
Repeat the command to associate the *asg-mgmt* application security group with the *vm-mgmt-nic* network interface.
803803

804804
```azurecli-interactive
805805
# Retrieve the network interface name associated with the virtual machine
@@ -809,7 +809,7 @@ nic_name=$(az vm show --resource-group test-rg --name vm-mgmt --query 'networkPr
809809
az network nic update \
810810
--resource-group test-rg \
811811
--name $nic_name \
812-
--application-security-groups asg-mgmt-servers
812+
--application-security-groups asg-mgmt
813813
```
814814

815815
---
@@ -938,15 +938,15 @@ export IP_ADDRESS=$(az vm show --show-details --resource-group test-rg --name vm
938938
ssh -o StrictHostKeyChecking=no azureuser@$IP_ADDRESS
939939
```
940940

941-
The connection succeeds because the network interface attached to the *vm-mgmt* VM is in the *asg-mgmt-servers* application security group, which allows port 22 inbound from the Internet.
941+
The connection succeeds because the network interface attached to the *vm-mgmt* VM is in the *asg-mgmt* application security group, which allows port 22 inbound from the Internet.
942942

943943
Use the following command to SSH to the *vm-web* VM from the *vm-mgmt* VM:
944944

945945
```bash
946946
ssh -o StrictHostKeyChecking=no azureuser@vm-web
947947
```
948948

949-
The connection succeeds because a default security rule within each network security group allows traffic over all ports between all IP addresses within a virtual network. You can't SSH to the *vm-web* VM from the Internet because the security rule for the *asg-web-servers* doesn't allow port 22 inbound from the Internet.
949+
The connection succeeds because a default security rule within each network security group allows traffic over all ports between all IP addresses within a virtual network. You can't SSH to the *vm-web* VM from the Internet because the security rule for the *asg-web* doesn't allow port 22 inbound from the Internet.
950950

951951
Use the following commands to install the nginx web server on the *vm-web* VM:
952952

@@ -964,7 +964,7 @@ The *vm-web* VM is allowed outbound to the Internet to retrieve nginx because a
964964
curl vm-web
965965
```
966966

967-
Sign out of the *vm-mgmt* VM. To confirm that you can access the *vm-web* web server from outside of Azure, enter `curl <publicIpAddress>` from your own computer. The connection succeeds because the *asg-web-servers* application security group, which the network interface attached to the *vm-web* VM is in, allows port 80 inbound from the Internet.
967+
Sign out of the *vm-mgmt* VM. To confirm that you can access the *vm-web* web server from outside of Azure, enter `curl <publicIpAddress>` from your own computer. The connection succeeds because the *asg-web* application security group, which the network interface attached to the *vm-web* VM is in, allows port 80 inbound from the Internet.
968968

969969
---
970970

0 commit comments

Comments
 (0)