Share via

I wanted to understand the NAT Gateway cost for the current billing month and which service is utilizing it.

SivaKalyan Yamarthi 20 Reputation points
2026-02-10T06:28:37.16+00:00

The NAT Gateway utilization has increased significantly all of a sudden. How can we identify which service is utilizing it?

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.


Answer accepted by question author
  1. Vallepu Venkateswarlu 7,935 Reputation points Microsoft External Staff Moderator
    2026-02-10T17:35:52.37+00:00

    Hello @SivaKalyan Yamarthi

    NAT Gateway costs increase based on outbound traffic volume and SNAT connection usage from any resource in the associated subnet.

    Identifying the consumer must be done indirectly by using VNet Flow Logs to correlate source private IP addresses with the underlying resources (such as VMs, VMSS instances, or Paas apps), and by analyzing destination IPs and ports to infer traffic type.

    To check which resources are using the NAT Gateway, follow the steps below:

    Step 1: Go to your NAT GatewayNetworking, and check which resources (such as subnets) the NAT Gateway is associated with.
    User's image

    Step 2: Enable Virtual Network flow logs on the NAT subnet.

    Go to the virtual network where the NAT Gateway is assigned → Virtual network flow logsCreate a flow log.

    User's image

    Under Analytics, make sure to enable Traffic Analytics and select the Log Analytics workspace

    User's image

    Once you create the Virtual Network flow logs, the logs will appear as JSON files in the Storage account container.
    User's image

    In this setup, the VM does not have a public IP and the subnet is associated with a NAT Gateway. NSG flow logs show outbound traffic from the VM private IP to public destination IPs allowed by the DefaultRule_AllowInternetOutBound rule.

    Since the subnet had a NAT Gateway attached at the time of the traffic, this outbound internet traffic would have been translated and egressed through the NAT Gateway public IP.

    User's image

    My VM Configuration:

    User's image

    **

    When the NAT Gateway was attached to the subnet, outbound internet traffic from the VM was translated and egressed through the NAT Gateway public IP, which is reflected in NAT Gateway metrics.

    After detaching the NAT Gateway, NAT metrics show no inbound, outbound, or SNAT activity, confirming that traffic is no longer flowing through the NAT Gateway.

    User's image**

    Ref: Virtual network flow logs compared to network security group flow logs

    Please do not forget to 210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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