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
Copy file name to clipboardExpand all lines: articles/virtual-wan/nat-rules-vpn-gateway-powershell.md
+39-39Lines changed: 39 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: 'Configure VPN NAT rules for your gateway using PowerShell'
3
3
titleSuffix: Azure Virtual WAN
4
4
description: Learn how to configure NAT rules for your VWAN VPN gateway using PowerShell.
5
5
services: virtual-wan
6
-
author: reasuquo
6
+
author: cherylmc
7
7
ms.service: virtual-wan
8
8
ms.topic: how-to
9
-
ms.date: 01/20/2022
10
-
ms.author: reasuquo
9
+
ms.date: 04/11/2022
10
+
ms.author: cherylmc
11
11
12
12
---
13
13
@@ -20,7 +20,7 @@ This configuration uses a flow table to route traffic from an external (host) IP
20
20
## Prerequisites
21
21
22
22
* Verify that you have an Azure subscription. If you don't already have an Azure subscription, you can activate your [MSDN subscriber benefits](https://azure.microsoft.com/pricing/member-offers/msdn-benefits-details) or sign up for a [free account](https://azure.microsoft.com/pricing/free-trial).
23
-
* This tutorial will create a NAT rule on a VpnGateway which will be associated with a VpnSiteConnection, so this assumes you have an existing VpnGateway connection to two branches with overlapping address spaces.
23
+
* This tutorial creates a NAT rule on a VPN gateway that will be associated with a VPN site connection. The steps assume that you have an existing Virtual WAN VPN gateway connection to two branches with overlapping address spaces.
24
24
25
25
### Azure PowerShell
26
26
@@ -32,11 +32,11 @@ This configuration uses a flow table to route traffic from an external (host) IP
32
32
33
33
## <aname="rules"></a>Configure NAT rules
34
34
35
-
You can configure and view NAT rules on your VPN gateway settings at any time using Azure PowerShell
35
+
You can configure and view NAT rules on your VPN gateway settings at any time using Azure PowerShell.
36
36
37
37
:::image type="content" source="./media/nat-rules-vpn-gateway/edit-rules.png" alt-text="Screenshot showing how to edit rules."lightbox="./media/nat-rules-vpn-gateway/edit-rules.png":::
38
38
39
-
1. Declare the variables for the existing resources
39
+
1. Declare the variables for the existing resources.
1. Create the new NAT rule to ensure the Site-to-site VPN gateway is able to distinguish between the two branches with overlapping address spaces.
48
+
1. Create the new NAT rule to ensure the site-to-site VPN gateway is able to distinguish between the two branches with overlapping address spaces.
49
49
50
50
You can set the parameters for the following values:
51
51
52
52
***Name:** A unique name for your NAT rule.
53
53
***Type:** Static or Dynamic. Static one-to-one NAT establishes a one-to-one relationship between an internal address and an external address. The subnet size for both internal and external mapping must be the same for static.
54
54
***Mode:** IngressSnat or EgressSnat.
55
-
* IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub’s Site-to-site VPN gateway.
56
-
* EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub’s Site-to-site VPN gateway.
57
-
***InternalMapping:** An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range.
58
-
***ExternalMapping:** An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range.
59
-
***Link Connection:** Connection resource that virtually connects a VPN site to the Azure Virtual WAN Hub's Site-to-site VPN gateway.
60
-
61
-
### Syntax
62
-
63
-
```
64
-
New-AzVpnGatewayNatRule
65
-
-ResourceGroupName <String>
66
-
-ParentResourceName <String>
67
-
-Name <String>
68
-
[-Type <String>]
69
-
[-Mode <String>]
70
-
-InternalMapping <String[]>
71
-
-ExternalMapping <String[]>
72
-
[-InternalPortRange <String[]>]
73
-
[-ExternalPortRange <String[]>]
74
-
[-IpConfigurationId <String>]
75
-
[-AsJob]
76
-
[-DefaultProfile <IAzureContextContainer>]
77
-
[-WhatIf]
78
-
[-Confirm] [<CommonParameters>]
79
-
```
80
-
81
-
```azurepowershell-interactive
55
+
* IngressSnat mode (also known as Ingress Source NAT) is applicable to traffic entering the Azure hub’s site-to-site VPN gateway.
56
+
* EgressSnat mode (also known as Egress Source NAT) is applicable to traffic leaving the Azure hub’s site-to-site VPN gateway.
57
+
***Internal Mapping:** An address prefix range of source IPs on the inside network that will be mapped to a set of external IPs. In other words, your pre-NAT address prefix range.
58
+
***External Mapping:** An address prefix range of destination IPs on the outside network that source IPs will be mapped to. In other words, your post-NAT address prefix range.
59
+
***Link Connection:** Connection resource that virtually connects a VPN site to the Azure Virtual WAN hub's site-to-site VPN gateway.
0 commit comments