You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
106
106
107
107
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.
108
108
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
+
109
111
```azurecli
110
112
az network lb inbound-nat-rule create \
111
113
--backend-port 443 \
112
114
--lb-name myLoadBalancer \
113
115
--name myInboundNATrule \
114
116
--protocol Tcp \
115
117
--resource-group myResourceGroup \
116
-
--backend-pool-name myBackendPool \
117
118
--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 \
0 commit comments