top of page
  • Writer's pictureALIF Consulting

Virtual Network NAT

Updated: Dec 11, 2023

Virtual Network NAT is a fully managed and highly resilient Network Address Translation (NAT) service. VNet NAT simplifies outbound Internet connectivity for virtual networks. When configured on a subnet, all outbound connectivity uses the VNet NAT's static public IP addresses.

NAT gateway provides outbound internet connectivity for one or more subnets of a virtual network. Once NAT gateway is associated to a subnet, NAT provides source network address translation (SNAT) for that subnet. NAT gateway specifies which static IP addresses virtual machines use when creating outbound flows. Static IP addresses come from public IP addresses, public IP prefixes, or both. If a public IP prefix is used, all IP addresses of the entire public IP prefix are consumed by a NAT gateway. A NAT gateway can use a total of up to 16 static IP addresses from either.

Virtual Network NAT

NAT Gateway benefits

Security

With NAT, individual VMs (or other compute resources) do not need public IP addresses and can remain fully private. Such resources without a public IP address can still reach external sources outside the VNet. You can also associate a Public IP Prefix to ensure that a contiguous set of IPs will be used for outbound. Destination firewall rules can be then configured based on this predictable IP list.

Resiliency

NAT is a fully managed and distributed service. It doesn't depend on any individual compute instances such as VMs or a single physical gateway device. It leverages software defined networking making it highly resilient.

Scalability

NAT can be associated to a subnet and can be used by all compute resources in that subnet. Further, all subnets in a VNet can leverage the same resource. When associated to a Public Ip Prefix, it will automatically scale to the number of IP addresses needed for outbound.

Performance

NAT will not impact the network bandwidth of your compute resources since it is a software defined networking service.

Connecting with Azure services

When connecting to Azure services from your private network, the recommended approach is to use Private Link. Private Link lets you access services in Azure from your private network without the use of a public IP address.

Connecting to the internet

NAT is recommended for outbound scenarios for all production workloads where you need to connect to a public endpoint. The following scenarios are examples of how to ensure coexistence of inbound with NAT gateway for outbound.


NAT Gateway Use Case

NAT and VM with instance-level Public IP – In this scenario, VM will use NAT gateway for outbound. Inbound originated isn't affected


NAT Gateway use case


NAT and VM with Standard Public Load Balancer – in this scenario, Any outbound configuration from a load-balancing rule or outbound rules is superseded by NAT gateway. Inbound originated isn't affected.


NAT and VM with instance-level Public IP and Standard Public Load Balancer – in this scenario, Any outbound configuration from a load-balancing rule or outbound rules is superseded by NAT gateway. The VM will also use NAT gateway for outbound. Inbound originated isn't affected.

NAT Gateway Monitoring - A network security group allows you to filter inbound and outbound traffic to and from a virtual machine. To monitor outbound traffic flowing from NAT, you can enable NSG flow logs.

NAT Gateway Performance - Each NAT gateway can provide up to 50 Gbps of throughput. You can split your deployments into multiple subnets and assign each subnet or group of subnets a NAT gateway to scale out.Each NAT gateway can support 64,000 flows each for TCP and UDP per assigned outbound IP address.


NAT Gateway Limitations

  • Basic load balancers and basic Public IP addresses are not compatible with NAT. Use standard SKU load balancers and Public IPs instead.

  • IP fragmentation isn't available for NAT gateway.



31 views0 comments

Recent Posts

See All
bottom of page