What is NAT Gateway in Azure

Anvesh
SilentTech
Published in
2 min readMay 28, 2024

NAT stands for network address translation.
It’s a way to map multiple private addresses inside a local network or an VNET to a single outbound public IP address.

Take a Scenario, you have an application server (Virtual Machine) in a VNet, and it’s been used to access an API service on an another VNET or over an internet, where this API Service allow connections from specific IP Addresses.
Then You can provide your Virtual Machine a static Public IP Address and this IP Address is configured at the API Service so that it allows this Virtual Machine to Communicate.
If we need to add two more application servers (Virtual Machines) for managing load, then we need to provide our API Service with additional two static public Ip addresses. which is tedious task and other applications being now dependent on your Implementations.

With the help of NAT Gateway, we can only expose one IP address to outside world and internally all VM’s map/talk to NAT Gateway.

Now API Service will have only one IP address of NAT Gateway configured and this NAT Gateway can be configured with any number of Virtual Machines.

Azure Network Address Translation (NAT) Gateway is a fully managed and highly resilient NAT service that provides outbound connectivity to the internet through the deployment of a NAT gateway resource.

NAT Gateway can be associated with multiple subnets. (Nat Gateway and subnets must be in same region).
A Subnet cannot be associated with multiple NAT Gateways

Services outside your virtual network can’t initiate an inbound connection through NAT gateway.

NAT gateway allows flows to be created from the virtual network to the services outside your virtual network.

Thank you for reading.
you can follow me at LinkedIn and Medium

--

--