Skip to content

Commit f5e6dfe

Browse files
authored
Update manage-inbound-nat-rules.md
1 parent 3ab98bf commit f5e6dfe

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

articles/load-balancer/manage-inbound-nat-rules.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,27 @@ $lb | Set-AzLoadBalancer
102102

103103
[!INCLUDE [azure-cli-prepare-your-environment.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
104104

105-
In this example, you create an inbound NAT rule to forward port **500** to backend port **443**.
105+
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
106106

107107
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.
108108

109+
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
110+
109111
```azurecli
110112
az network lb inbound-nat-rule create \
111113
--backend-port 443 \
112114
--lb-name myLoadBalancer \
113115
--name myInboundNATrule \
114116
--protocol Tcp \
115117
--resource-group myResourceGroup \
116-
--backend-pool-name myBackendPool \
117118
--frontend-ip-name myFrontend \
118-
--frontend-port-range-end 1000 \
119-
--frontend-port-range-start 500
119+
--frontend-port 500
120+
121+
az network nic ip-config inbound-nat-rule add --inbound-nat-rule \
122+
--ip-config-name MyIpConfig\
123+
--nic-name MyNic\
124+
--resource-group myResourceGroup\
125+
--lb-name myLoadBalancer
120126
```
121127
---
122128

0 commit comments

Comments
 (0)