Can I assign a private IP to NAT gateway

Anchal Singh 5 Reputation points
2025-01-20T10:41:35.05+00:00

Hi I want my logic apps to make API calls using a STATIC PRIVATE IP. Can I assign a private IP to the NAT gateway?

The logic app will send API request to an internal server so I want this to route internally not over the public internet.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,551 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.
60 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Zafer KAYA 90 Reputation points MVP
    2025-01-20T11:35:32.25+00:00
    1. Create a Virtual Network (VNet):
      • Create a VNet if you don't have one already.
      • Ensure your Logic Apps are integrated with this VNet.
    2. Set up a Private Endpoint for Logic Apps:
      • Azure Logic Apps can be configured to connect to your VNet using a Private Endpoint.
      • Create a Private Endpoint for your Logic App. This will ensure that all traffic from the Logic App to the API goes through your VNet, keeping it internal.
    3. Create a NAT Gateway:
      • A NAT Gateway allows your VNet to access resources over the internet or external services, but using a private IP.
      • Create a NAT Gateway and associate it with the subnet in the VNet that your Logic Apps will use.
    4. Assign Static Private IP to NAT Gateway:
      • When setting up the NAT Gateway, assign a static private IP from the subnet to ensure the outbound traffic from the Logic App always uses this private IP.
      • You need to ensure that the subnet where your Logic App runs is using this NAT Gateway for outbound traffic.
    5. Route traffic through NAT Gateway:
      • In the Route Table associated with the subnet where the Logic App is deployed, ensure that the route is directed to the NAT Gateway.
      • This ensures that any outbound traffic from your Logic App to the internal server stays within the private network.
    6. Ensure Internal Server Accessibility:
      • Verify that the internal server where your Logic App will send API requests is accessible from the VNet.
      • The internal server should have the appropriate network security group (NSG) rules and private IP address configured to accept traffic from the Logic Apps.
    7. Testing:
      • Once configured, test the API calls from your Logic App to ensure the traffic is routed over the private network and uses the static private IP of the NAT Gateway.
    0 comments No comments

  2. Anchal Singh 5 Reputation points
    2025-02-06T16:15:12.09+00:00

    Can you provide me any documentation on how to complete step 4? How do I Assign Static Private IP to NAT Gateway?

    It keeps on asking for a public IP and I see no way to assign just a private IP here. Do you mean assign a public/private IP pair?


  3. Alex Burlachenko 10,255 Reputation points
    2025-02-13T10:57:35.64+00:00

    hi,

    nope, you can’t assign a private IP to a NAT gateway. NAT gateways in Azure are all about giving your resources (like VMs) outbound internet access using a public IP. They don’t handle private IPs or internal routing.


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.