Introduction

NAT defines the mechanisms for translating one IP address to another in an IP packet. It's commonly used to connect networks with overlapping IP address ranges. NAT rules or policies on the gateway devices connecting the networks specify the address mappings for the address translation on the networks.

NAT is applied to the connections that have NAT rules.

NAT rules

The diagram shows an Azure VNet and two on-premises networks, all with an address space of 10.0.1.0/24. To connect these two networks to the Azure VNet and VPN gateway, create the following rules.

In the diagram, each connection resource has the following rules.

Pre-requisites

Step 1. Navigate to the Configuration section under Settings on the Virtual Network Gateway. Change the SKU to VpnGw2 and click Save.

Configuration

Configuring the NAT Rules.

Mode

Type

Step 2. Navigate to the NAT Rules section under Settings on the Virtual Network Gateway.

Step 3. Once successfully configured, click Save.

This process will take 10 minutes to make the changes.

Save

Associating the NAT rules to the VPN Connection.

Step 1. Navigate to the NAT Rules section under Settings on the Connection.

VPN Connection

Step 2. Select the Ingress NAT Rules and Egress NAT Rules and click Save.

Egress NAT Rules 

Verification

Navigate to the NAT Rules section under Settings on the Virtual Network Gateway.

Verification