@@ -151,7 +151,7 @@ Use [Add-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/add-azvirtu
151
151
``` azurepowershell
152
152
# Create default subnet
153
153
$subnetParams = @{
154
- Name = 'default '
154
+ Name = 'subnet-1 '
155
155
AddressPrefix = '10.0.0.0/24'
156
156
VirtualNetwork = $hubVnet
157
157
}
@@ -260,7 +260,7 @@ Use [az group create](/cli/azure/group#az_group_create) to create a resource gro
260
260
``` bash
261
261
az group create \
262
262
--name test-rg \
263
- --location " South Central US "
263
+ --location southcentralus
264
264
```
265
265
266
266
Use [ az network vnet create] ( /cli/azure/network/vnet#az-network-vnet-create ) to create the hub virtual network.
@@ -270,10 +270,29 @@ az network vnet create \
270
270
--resource-group test-rg \
271
271
--name vnet-hub \
272
272
--address-prefix 10.0.0.0/16 \
273
- --subnet-name AzureFirewallSubnet \
274
- --subnet-prefix 10.0.1 .0/24
273
+ --subnet-name subnet-1 \
274
+ --subnet-prefix 10.0.0 .0/24
275
275
```
276
276
277
+ Use [ az network vnet subnet create] ( /cli/azure/network/vnet/subnet#az-network-vnet-subnet-create ) to create a subnet for Azure Bastion.
278
+
279
+ ``` bash
280
+ az network vnet subnet create \
281
+ --resource-group test-rg \
282
+ --vnet-name vnet-hub \
283
+ --name AzureBastionSubnet \
284
+ --address-prefix 10.0.1.0/26
285
+ ```
286
+
287
+ Use [ az network vnet subnet create] ( /cli/azure/network/vnet/subnet#az-network-vnet-subnet-create ) to create a subnet for Azure Firewall.
288
+
289
+ ``` bash
290
+ az network vnet subnet create \
291
+ --resource-group test-rg \
292
+ --vnet-name vnet-hub \
293
+ --name AzureFirewallSubnet \
294
+ --address-prefix 10.0.1.64/26
295
+ ```
277
296
Use [ az network public-ip create] ( /cli/azure/network/public-ip#az-network-public-ip-create ) to create a public IP for Azure Bastion.
278
297
279
298
``` bash
@@ -304,16 +323,6 @@ az network public-ip create \
304
323
--sku Standard
305
324
```
306
325
307
- Use [ az network firewall create] ( /cli/azure/network/firewall#az-network-firewall-create ) to create Azure Firewall.
308
-
309
- ``` bash
310
- az network firewall create \
311
- --resource-group test-rg \
312
- --name firewall \
313
- --vnet-name vnet-hub \
314
- --public-ip-address public-ip-firewall
315
- ```
316
-
317
326
Use [ az network firewall policy create] ( /cli/azure/network/firewall/policy#az-network-firewall-policy-create ) to create a firewall policy.
318
327
319
328
``` bash
@@ -322,13 +331,15 @@ az network firewall policy create \
322
331
--name firewall-policy
323
332
```
324
333
325
- Use [ az network firewall update ] ( /cli/azure/network/firewall#az-network-firewall-update ) to associate the firewall policy with the firewall .
334
+ Use [ az network firewall create ] ( /cli/azure/network/firewall#az-network-firewall-create ) to create Azure Firewall .
326
335
327
336
``` bash
328
- az network firewall update \
329
- --resource-group test-rg \
330
- --name firewall \
331
- --firewall-policy firewall-policy
337
+ az network firewall create \
338
+ --resource-group test-rg \
339
+ --name firewall \
340
+ --vnet-name vnet-hub \
341
+ --firewall-policy firewall-policy \
342
+ --public-ip public-ip-firewall
332
343
```
333
344
334
345
---
@@ -384,7 +395,7 @@ Use [New-AzPublicIpAddress](/powershell/module/az.network/new-azpublicipaddress)
384
395
# Create public IP for NAT gateway
385
396
$publicIpNatParams = @{
386
397
ResourceGroupName = 'test-rg'
387
- Location = 'South Central US '
398
+ Location = 'southcentralus '
388
399
Name = 'public-ip-nat'
389
400
AllocationMethod = 'Static'
390
401
Sku = 'Standard'
@@ -827,7 +838,7 @@ Use [az network route-table create](/cli/azure/network/route-table#az-network-ro
827
838
az network route-table create \
828
839
--resource-group test-rg \
829
840
--name route-table-spoke \
830
- --location " South Central US "
841
+ --location southcentralus
831
842
```
832
843
833
844
Use [ az network route-table route create] ( /cli/azure/network/route-table/route#az-network-route-table-route-create ) to create a route.
@@ -944,22 +955,32 @@ New-AzFirewallPolicyRuleCollectionGroup @newRuleCollectionGroupParams
944
955
945
956
### [ CLI] ( #tab/cli )
946
957
947
- Use [ az network firewall policy rule-collection-group collection rule add ] ( /cli/azure/network/firewall/policy/rule-collection-group/collection#az-network-firewall-policy- rule-collection-group-collection-rule-add ) to create a network rule collection.
958
+ Use [ az network firewall policy rule-collection-group create ] ( /cli/azure/network/firewall/policy/rule-collection-group#create-a- rule-collection-group ) to create a rule collection group .
948
959
949
960
``` bash
950
- az network firewall policy rule-collection-group collection rule add \
951
- --policy-name firewall-policy \
952
- --resource-group test-rg \
953
- --rule-collection-group-name DefaultNetworkRuleCollectionGroup \
954
- --name spoke-to-internet \
955
- --rule-name allow-web \
956
- --rule-type NetworkRule \
957
- --priority 100 \
958
- --action Allow \
959
- --source-addresses 10.1.0.0/24 \
960
- --destination-addresses ' *' \
961
- --destination-ports 80 443 \
962
- --protocols TCP
961
+ az network firewall policy rule-collection-group create \
962
+ --name DefaultNetworkRuleCollectionGroup \
963
+ --policy-name firewall-policy \
964
+ --resource-group test-rg \
965
+ --priority 200
966
+ ```
967
+
968
+ Use [ az network firewall policy rule-collection-group collection add-filter-collection] ( /cli/azure/network/firewall/policy/rule-collection-group/collection#add-a-filter-collection ) to create a network rule collection.
969
+
970
+ ``` bash
971
+ az network firewall policy rule-collection-group collection add-filter-collection \
972
+ --name " spoke-to-internet" \
973
+ --action Allow \
974
+ --rule-name " allow-web" \
975
+ --rule-type NetworkRule \
976
+ --source-addresses " 10.1.0.0/24" \
977
+ --ip-protocols TCP \
978
+ --destination-addresses " *" \
979
+ --destination-ports " *" \
980
+ --collection-priority 100 \
981
+ --policy-name " firewall-policy" \
982
+ --resource-group " test-rg" \
983
+ --rule-collection-group-name " DefaultNetworkRuleCollectionGroup"
963
984
```
964
985
965
986
---
@@ -1121,7 +1142,7 @@ Use [az network nsg create](/cli/azure/network/nsg#az-network-nsg-create) to cre
1121
1142
az network nsg create \
1122
1143
--resource-group test-rg \
1123
1144
--name nsg-1 \
1124
- --location " South Central US "
1145
+ --location southcentralus
1125
1146
```
1126
1147
1127
1148
Use [ az network nic create] ( /cli/azure/network/nic#az-network-nic-create ) to create a network interface.
@@ -1141,11 +1162,11 @@ Use [az vm create](/cli/azure/vm#az-vm-create) to create a virtual machine.
1141
1162
az vm create \
1142
1163
--resource-group test-rg \
1143
1164
--name vm-spoke \
1144
- --location " South Central US " \
1165
+ --location southcentralus \
1145
1166
--nics vm-spoke-nic \
1146
- --image UbuntuLTS \
1167
+ --image Ubuntu2204 \
1147
1168
--admin-username azureuser \
1148
- --admin-password < password >
1169
+ --generate-ssh-keys
1149
1170
```
1150
1171
1151
1172
---
0 commit comments