Skip to content

Commit 5f1f904

Browse files
authored
Merge pull request #184790 from asudbring/ob-nat-tutorial
New article for migration outbound access to a NAT gateway
2 parents 3939d3c + 615750c commit 5f1f904

File tree

4 files changed

+170
-0
lines changed

4 files changed

+170
-0
lines changed
178 KB
Loading
105 KB
Loading

articles/virtual-network/nat-gateway/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ items:
2020
href: tutorial-nat-gateway-load-balancer-public-portal.md
2121
- name: Integrate NAT gateway internal load balancer
2222
href: tutorial-nat-gateway-load-balancer-internal-portal.md
23+
- name: Migrate outbound access
24+
href: tutorial-migrate-outbound-nat.md
2325
expanded: true
2426
- name: Concepts
2527
items:
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: 'Tutorial: Migrate outbound access to NAT gateway'
3+
titlesuffix: Azure Virtual Network NAT
4+
description: Learn how to migrate outbound access in your virtual network to a Virtual Network NAT gateway.
5+
author: asudbring
6+
ms.author: allensu
7+
ms.service: virtual-network
8+
ms.subservice: nat
9+
ms.topic: tutorial
10+
ms.date: 1/11/2022
11+
ms.custom: template-tutorial
12+
---
13+
14+
# Tutorial: Migrate outbound access to Azure Virtual Network NAT
15+
16+
In this article, you'll learn how to migrate your outbound connectivity from [default outbound access](../ip-services/default-outbound-access.md) to a NAT gateway. You'll learn how to change your outbound connectivity from load balancer outbound rules to a NAT gateway. You'll reuse the IP address from the outbound rule configuration for the NAT gateway.
17+
18+
Azure Virtual Network NAT is the recommended method for outbound connectivity. A NAT gateway is a fully managed and highly resilient Network Address Translation (NAT) service. A NAT gateway doesn't have the same limitations of SNAT port exhaustion as default outbound access. A NAT gateway replaces the need for outbound rules in a load balancer for outbound connectivity.
19+
20+
For more information about Azure Virtual Network NAT, see [What is Azure Virtual Network NAT](nat-overview.md)
21+
22+
In this tutorial, you learn how to:
23+
24+
> [!div class="checklist"]
25+
> * Migrate default outbound access to a NAT gateway.
26+
> * Migrate load balancer outbound connectivity and IP address to a NAT gateway.
27+
28+
## Prerequisites
29+
30+
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
31+
32+
* A standard public load balancer in your subscription. The load balancer must have a separate frontend IP address and outbound rules configured. For more information on creating an Azure Load Balancer, see [Quickstart: Create a public load balancer to load balance VMs using the Azure portal](../../load-balancer/quickstart-load-balancer-standard-public-portal.md)
33+
* The load balancer name used in the examples is **myLoadBalancer**.
34+
35+
> [!NOTE]
36+
> Virtual Network NAT provides outbound connectivity for standard internal load balancers. To configure create a NAT gateway resource and associate it to your subnet. For more information on integrating a NAT gateway with your internal load balancers, see [Tutorial: Integrate NAT gateway with an internal load balancer - Azure portal - Virtual Network NAT](tutorial-nat-gateway-load-balancer-internal-portal.md).
37+
38+
## Migrate default outbound access
39+
40+
In this section, you’ll learn how to change your outbound connectivity method from default outbound access to a NAT gateway.
41+
42+
1. Sign in to the [Azure portal](https://portal.azure.com).
43+
44+
2. In the search box at the top of the portal, enter **NAT gateway**. Select **NAT gateways**.
45+
46+
3. In **NAT gateways**, select **+ Create**.
47+
48+
4. In **Create network address translation (NAT) gateway**, enter or select the following information.
49+
50+
| Setting | Value |
51+
| ------- | ----- |
52+
| **Project details** | |
53+
| Subscription | Select your subscription. |
54+
| Resource group | Select **Create new**. </br> Enter **myResourceGroup**. </br> Select **OK**. |
55+
| **Instance details** | |
56+
| NAT gateway name | Enter **myNATgateway**. |
57+
| Region | Select the region of your virtual network. In this example, it's **West Europe**. |
58+
| Availability zone | Leave the default of **None**. |
59+
| Idle timeout (minutes) | Enter **10**. |
60+
61+
5. Select the **Outbound IP** tab, or select **Next: Outbound IP** at the bottom of the page.
62+
63+
6. In **Public IP addresses** in the **Outbound IP** tab, select **Create a new public IP address**.
64+
65+
7. In **Add a public IP address**, enter **myNATgatewayIP** in **Name**. Select **OK**.
66+
67+
8. Select the **Subnet** tab, or select **Next: Subnet** at the bottom of the page.
68+
69+
9. In the pull-down box for **Virtual network**, select your virtual network.
70+
71+
10. In **Subnet name**, select the checkbox next to your subnet.
72+
73+
11. Select the **Review + create** tab, or select **Review + create** at the bottom of the page.
74+
75+
12. Select **Create**.
76+
77+
## Migrate load balancer outbound connectivity
78+
79+
In this section, you’ll learn how to change your outbound connectivity method from outbound rules to a NAT gateway. You'll keep the same frontend IP address used for the outbound rules. You'll remove the outbound rule’s frontend IP configuration then create a NAT gateway with the same frontend IP address. A public load balancer is used throughout this section.
80+
81+
### Remove outbound rule frontend IP configuration
82+
83+
You remove the outbound rule and the associated frontend IP configuration from your load balancer. The load balancer name used in this example is **myLoadBalancer**.
84+
85+
1. Sign in to the [Azure portal](https://portal.azure.com).
86+
87+
2. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
88+
89+
3. Select **myLoadBalancer** or your load balancer.
90+
91+
4. In **myLoadBalancer**, select **Frontend IP configuration** in **Settings**.
92+
93+
5. Note the **IP address** in **Frontend IP configuration** that you wish to migrate to a **NAT gateway**. You'll need this information in the next section. In this example, it's **myFrontendIP-outbound**.
94+
95+
6. Select **Delete** next to the IP configuration you wish to remove. In this example, it's **myFrontendIP-outbound**.
96+
97+
:::image type="content" source="./media/tutorial-migrate-outbound-nat/frontend-ip.png" alt-text="Screenshot of frontend IP address removal for NAT gateway.":::
98+
99+
100+
7. Select **Delete**.
101+
102+
8. In **Delete myFrontendIP-outbound**, select the check box next to **I have read and understood that this frontend IP configuration as well as the associated resources listed above will be deleted**.
103+
104+
9. Select **Delete**. This procedure will delete the frontend IP configuration and the outbound rule associated with the frontend.
105+
106+
:::image type="content" source="./media/tutorial-migrate-outbound-nat/delete-frontend-ip.png" alt-text="Screenshot of confirmation of frontend IP address removal for NAT gateway.":::
107+
108+
### Create NAT gateway
109+
110+
In this section, you’ll create a NAT gateway with the IP address previously used for outbound rule and assign it to your pre-created subnet within your virtual network. The subnet name for this example is **myBackendSubnet**.
111+
112+
1. In the search box at the top of the portal, enter **NAT gateway**. Select **NAT gateways**.
113+
114+
2. In **NAT gateways**, select **+ Create**.
115+
116+
3. In **Create network address translation (NAT) gateway**, enter or select the following information.
117+
118+
| Setting | Value |
119+
| ------- | ----- |
120+
| **Project details** | |
121+
| Subscription | Select your subscription. |
122+
| Resource group | Select **Create new**. </br> Enter **myResourceGroup**. </br> Select **OK**. |
123+
| **Instance details** | |
124+
| NAT gateway name | Enter **myNATgateway**. |
125+
| Region | Select the region of your virtual network. In this example, it's **West Europe**. |
126+
| Availability zone | Leave the default of **None**. |
127+
| Idle timeout (minutes) | Enter **10**. |
128+
129+
4. Select the **Outbound IP** tab, or select **Next: Outbound IP** at the bottom of the page.
130+
131+
5. In **Public IP addresses** in the **Outbound IP** tab, select the IP address you noted from the previous section. In this example, it's **myPublicIP-outbound**.
132+
133+
6. Select the **Subnet** tab, or select **Next: Subnet** at the bottom of the page.
134+
135+
9. In the pull-down box for **Virtual network**, select your virtual network.
136+
137+
10. In **Subnet name**, select the checkbox for your subnet. In this example, it's **myBackendSubnet**.
138+
139+
11. Select the **Review + create** tab, or select **Review + create** at the bottom of the page.
140+
141+
12. Select **Create**.
142+
143+
## Clean up resources
144+
145+
If you're not going to continue to use this application, delete
146+
the virtual network, virtual machine, and NAT gateway with the following steps:
147+
148+
1. From the left-hand menu, select **Resource groups**.
149+
150+
2. Select the **myResourceGroup** resource group.
151+
152+
3. Select **Delete resource group**.
153+
154+
4. Enter **myResourceGroup** and select **Delete**.
155+
156+
## Next steps
157+
158+
In this article, you learned how to:
159+
160+
* Migrate default outbound access to a NAT gateway.
161+
162+
* Migrate load balancer outbound connectivity and IP address to a NAT gateway.
163+
164+
For more information about NAT gateway and the connectivity benefits it provides, see [Design virtual networks with NAT gateway](nat-gateway-resource.md).
165+
166+
Advance to the next article to learn how to integrate a NAT gateway with a public load balancer:
167+
> [!div class="nextstepaction"]
168+
> [Integrate a NAT gateway with a public load balancer using the Azure portal](tutorial-nat-gateway-load-balancer-public-portal.md)

0 commit comments

Comments
 (0)