From f5e6dfef818d39b59783ce0a9c84359f95992e0f Mon Sep 17 00:00:00 2001 From: mahipdeora <110857524+mahipdeora@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:55:32 -0500 Subject: [PATCH] Update manage-inbound-nat-rules.md --- articles/load-balancer/manage-inbound-nat-rules.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/articles/load-balancer/manage-inbound-nat-rules.md b/articles/load-balancer/manage-inbound-nat-rules.md index 55bb2b6f1e7b1..82e65f9045b71 100644 --- a/articles/load-balancer/manage-inbound-nat-rules.md +++ b/articles/load-balancer/manage-inbound-nat-rules.md @@ -102,10 +102,12 @@ $lb | Set-AzLoadBalancer [!INCLUDE [azure-cli-prepare-your-environment.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)] -In this example, you create an inbound NAT rule to forward port **500** to backend port **443**. +In this example, you will create an inbound NAT rule to forward port **500** to backend port **443**. You will then attach the inbound NAT rule to a VM's NIC Use [az network lb inbound-nat-rule create](/cli/azure/network/lb/inbound-nat-rule#az-network-lb-inbound-nat-rule-create) to create the NAT rule. +Use [az network nic ip-config inbound-nat-rule add](/cli/azure/network/nic/ip-config/inbound-nat-rule) to add a reference of the inbound NAT rule to the VM's NIC + ```azurecli az network lb inbound-nat-rule create \ --backend-port 443 \ @@ -113,10 +115,14 @@ Use [az network lb inbound-nat-rule create](/cli/azure/network/lb/inbound-nat-ru --name myInboundNATrule \ --protocol Tcp \ --resource-group myResourceGroup \ - --backend-pool-name myBackendPool \ --frontend-ip-name myFrontend \ - --frontend-port-range-end 1000 \ - --frontend-port-range-start 500 + --frontend-port 500 + + az network nic ip-config inbound-nat-rule add --inbound-nat-rule \ + --ip-config-name MyIpConfig\ + --nic-name MyNic\ + --resource-group myResourceGroup\ + --lb-name myLoadBalancer ``` ---