How can I configure NAT on my VM subnets to route traffic through a single allowed IP address for accessing the client's system via the Site-to-Site VPN?

Faisal Kabeer 40 Reputation points
2025-01-21T11:54:54.6233333+00:00

I have established a Site-to-Site VPN connection with my client, and it is active. However, when using my VM in the default subnet, I am unable to access the client's system because the client has permitted only one IP address. Therefore, I need to configure NAT on my VM subnets to route traffic through the allowed IP address to reach the client.

How can I NAT my source address in Azure?

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,628 questions
Azure NAT Gateway
Azure NAT Gateway
NAT Gateway is a fully managed service that securely routes internet traffic from a private virtual network with enterprise-grade performance and low latency.
46 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 48,571 Reputation points Microsoft Employee
    2025-01-29T12:04:28.24+00:00

    Faisal Kabeer,

    Greetings.

    Points to Note:

    1. Azure does not have an out of the box Private Traffic NAT Solution as of today.
    2. Azure NAT Gateway is used for Internet Bound communications, not for S2S traffic

    There are 2 options you can consider,

    1.

    • You can consider using Dynamic NAT on Azure VPN Gateway
    • When Dynamic NAT rules are used, traffic is unidirectional which means communication must be initiated from the site that is represented in the Internal Mapping field of the rule. If traffic is initiated from the External Mapping, the connection will not be established.
    • You should use an EgressSNAT Rule
    • If you require bidirectional traffic initiation, then use a static NAT rule to define a 1:1 mapping. (But static NAT would have a wider Address range)
    • You can also use the Azure Firewall SNAT ***with private IP address ranges *and not DNAT
    • Again, this requires that the OnPrem (Destination) whitelist the entire AzureFirewallSubnet range
      • As Azure Firewall SNATs the traffic to one of the firewall private IP addresses in AzureFirewallSubnet range
    • The AzureFirewallSubnet should be a minimum of /26 - meaning, you should whitelist the 62 IP Addresses that are part of the /26 AzureFirewallSubnet

    Hope this is clear.

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.