I cannot save external mapping on Azure Network Gateway (VPN) NAT Rule - gets saved as external mapping = internal mapping

Matthew Campbell 21 Reputation points
2022-05-06T02:23:49.173+00:00

I am having issues trying to configure a NAT rule on an Azure Virtual Network Gateway. I'm using the sku VpnGw2

I'm using the azure web portal to configure the resource. I want a static EgressSnat rule that maps an VNET address 10.6.0.64/32 to 20.190.117.64/32.

I enter the Mode: EgressSnat, Internal Mappings: 10.6.0.64/32, External Mappings: 20.190.117.64/32 and press Save.

Going back to the NAT rules screen and both Internal and External Mappings are set to 10.6.0.64/32.

What am I doing wrong?

Screenshot 1: 199434-image.png

Screenshot 2: 199435-image.png

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,146 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 22,941 Reputation points Microsoft Employee
    2022-05-09T21:34:32.507+00:00

    Hello @Matthew Campbell , welcome to the Microsoft Q&A forum.

    I tried setting up a similar NAT rule at my end, and I did not face the issue above and the rule was saved correctly.

    200410-image.png

    200370-image.png

    The issue here might be due to a transient portal error. Can you try below mentioned steps and see if that helps in resolving the issue?

    1. Can you try clearing cache and cookies for your browser and then try adding the NAT Rule? if possible using a different browser can help as well. Please let me know if the issue still persists.
    2. Can you try enabling the NAT rule using PowerShell commands? This might help us to pinpoint the actual issue. You can run the below mentioned command to add a NAT rule. You can run this command using Azure Cloud shell. $Gw = Get-AzVirtualNetworkGateway -Name "<your-Gw-name>" -ResourceGroupName "<RG_Name>"
      $Egress = New-AzVirtualNetworkGatewayNatRule -name "<rule_name>" -type "static" -mode "EgressSnat" -InternalMapping @("<IPaddress>") -externalmapping @("IPaddress") -InternalPortRange "<port>" -ExternalPortRange "<port>"
      Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gw -NatRule $Egress

    Hope this helps! Please let me know if you have any additional concerns. Thank you!


0 additional answers

Sort by: Most helpful