Can you please explain how NAT gateway works?

Vishwa Teja Devarakonda 0 Reputation points
2025-01-30T14:35:14.93+00:00

Hi Q&A,

I have doubt on NAT gateway.

User's image

If I create NAT gateway by taking public IP of my VM, can I able to access my VM with associated public IP address?

If it is not able to access, how can I access if i configure NAT to my VM?

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
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rohith Vinnakota 2,180 Reputation points Microsoft Vendor
    2025-01-30T15:05:16.5733333+00:00

    Hi @Vishwa Teja Devarakonda,

    I understand that you want to know about Nat Gateway.

    • Azure Nat Gateway is used for Internet Bound Communication not for the access the VM and can't be associate to the VM.
    • It provides outbound internet connectivity for virtual machines without requiring public IP addresses on each VM
    • It can be attached to subnet in the vnet.

    If I create NAT gateway by taking public IP of my VM, can I able to access my VM with associated public IP address?

    No.

    If it is not able to access, how can I access if i configure NAT to my VM?

    To access the VM, please use the Public IP for inbound access. Nat Gateway only used for the Outbound access to the internet.

    Refer this link : https://learn.microsoft.com/en-us/azure/nat-gateway/faq

    I hope it helps.


    If above is unclear and/or you are unsure about something add a comment below.

    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.


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.