@@ -15,8 +15,8 @@ In this article you'll learn how to configure, update, and delete inbound NAT Ru
15
15
16
16
## Prerequisites
17
17
18
- - A running instance of [ Azure Load Balancer] ( quickstart-load-balancer-standard-public-portal.md ) .
19
- - A [ Virtual Machine Scale Set instance] ( configure-vm-scale-set-portal.md ) in the backend pool of the running load balancer.
18
+ - A standard SKU [ Azure Load Balancer] ( quickstart-load-balancer-standard-public-portal.md ) in the same subscription as the Virtual Machine Scale Set .
19
+ - A [ Virtual Machine Scale Set instance] ( configure-vm-scale-set-portal.md ) in the backend pool of the load balancer.
20
20
- An Azure account with an active subscription. [ Create an account for free] ( https://azure.microsoft.com/free/?WT.mc_id=A261C142F ) .
21
21
22
22
## Add inbound NAT rules
@@ -28,16 +28,16 @@ The new inbound NAT rule shouldn't have an overlapping front-end port range with
28
28
29
29
``` azurecli
30
30
31
- az network lb inbound-nat-rule create
32
- -g MyResourceGroup
33
- --lb- name MyLb
34
- -n MyNatRule
35
- --protocol TCP
36
- --frontend-port-range-start 200
37
- --frontend-port-range-end 250
38
- --backend-port 22
39
- --backend-pool-name mybackend
40
- --frontend-ip-name MyFrontendIp
31
+ az network lb inbound-nat-rule create \
32
+ --resource-group MyResourceGroup \
33
+ --name MyNatRule \
34
+ --lb-name MyLb \
35
+ --protocol TCP \
36
+ --frontend-port-range-start 200 \
37
+ --frontend-port-range-end 250 \
38
+ --backend-port 22 \
39
+ --backend-pool-name mybackend \
40
+ --frontend-ip-name MyFrontendIp
41
41
42
42
```
43
43
@@ -46,12 +46,11 @@ When using inbound NAT rules with Virtual Machine Scale Sets, Individual inbound
46
46
47
47
``` azurecli
48
48
49
- az network lb inbound-nat-rule update
50
- -g MyResourceGroup
51
- --lb-name MyLb
52
-
53
- -n MyNatPool
54
- --frontend-port-range-start 150
49
+ az network lb inbound-nat-rule update \
50
+ --resource-group MyResourceGroup \
51
+ --name MyNatPool \
52
+ --lb-name MyLb \
53
+ --frontend-port-range-start 150 \
55
54
--frontend-port-range-end 250
56
55
57
56
```
@@ -61,7 +60,7 @@ When using inbound NAT rules with Virtual Machine Scale Sets, Individual inbound
61
60
62
61
``` azurecli
63
62
64
- az network lb inbound-nat-rule delete -g MyResourceGroup --lb- name MyLb -n MyNatRule
63
+ az network lb inbound-nat-rule delete --resourcegroup MyResourceGroup --name MyNatRule --lb-name MyLb
65
64
66
65
```
67
66
@@ -70,26 +69,26 @@ az network lb inbound-nat-rule delete -g MyResourceGroup --lb-name MyLb -n MyNat
70
69
Multiple inbound NAT rules can be attached to a single Virtual Machine Scale Set, given that the rules frontend port ranges aren’t overlapping. This is accomplished by having multiple inbound NAT rules that target the same backend pool. A full example using the CLI is shown.
71
70
72
71
``` azurecli
73
- az network lb inbound-nat-rule create
74
- -g MyResourceGroup
75
- --lb- name MyLb
76
- -n MyNatRule
77
- --protocol TCP
78
- --frontend-port-range-start 200
79
- --frontend-port-range-end 250
80
- --backend-port 22
81
- --backend-pool-name mybackend
72
+ az network lb inbound-nat-rule create \
73
+ --resource-group MyResourceGroup \
74
+ --name MyNatRule \
75
+ --lb-name MyLb \
76
+ --protocol TCP \
77
+ --frontend-port-range-start 200 \
78
+ --frontend-port-range-end 250 \
79
+ --backend-port 22 \
80
+ --backend-pool-name mybackend \
82
81
--frontend-ip-name MyFrontendIp
83
82
84
- az network lb inbound-nat-rule create
85
- -g MyResourceGroup
86
- --lb- name MyLb
87
- -n MyNatRule2
88
- --protocol TCP
89
- --frontend-port-range-start 150
90
- --frontend-port-range-end 180
91
- --backend-port 80
92
- --backend-pool-name mybackend
83
+ az network lb inbound-nat-rule create \
84
+ --resource-group MyResourceGroup \
85
+ --name MyNatRule2 \
86
+ --lb-name MyLb \
87
+ --protocol TCP \
88
+ --frontend-port-range-start 150 \
89
+ --frontend-port-range-end 180 \
90
+ --backend-port 80 \
91
+ --backend-pool-name mybackend \
93
92
--frontend-ip-name MyFrontendIp
94
93
95
94
```
0 commit comments