Blog Post

Azure Integration Services Blog
2 MIN READ

Static IP of Logic App Standard using NAT Gateway

KalyaniD's avatar
KalyaniD
Icon for Microsoft rankMicrosoft
Feb 28, 2023

Scenario

 

Route Logic App Standard traffic through your Virtual Network through specified static public IP address(es).

This approach will not work with Logic App Consumption

 

References

 

 

Services Used

 

  • Azure Logic Apps (Standard)
  • Azure Virtual Network
  • Azure NAT Gateway

 

Steps

 

1. Create Virtual Network

 

 

 

2. Create Logic App Standard

 

 

 

3. Create a workflow within the Logic App and set up an outbound HTTP action. 

This external website returns the IP address of the caller. This step mimics the HTTP trigger function mentioned here: 

Control Azure Functions outbound IP with an Azure virtual network NAT gateway | Microsoft Learn

 

 

4. Integrate the Virtual Network Integration on the Logic App and select the VNET/subnet that was created in Step 1.

 

 

 

 

5. (Optional) Test without the NAT Gateway Linked

  • Invoke the workflow first and make the outbound call before configuring the NAT Gateway for testing/checking which IP address is returned.
  • In this case, the IP address that was returned by the service is 20.88.178.231
  • The IP address is part of the range of outbound IP addresses of the Logic App on the Networking page.

 

 

Navigate to the Networking blade of the Logic App and click on the list of Outbound IP addresses to view the full set. The IP address returned is part of the list.

 

 

 

 

6. Create NAT Gateway and integrate it to the Virtual Network

 

These below steps can be done during or after creation:

  1. Link the NAT Gateway to the Virtual Network and subnet that is configured on the Logic App.
  2. Create a Public IP Address, which will act as the outbound IP address.

 

 

 

Check to see what the IP address has been created. The Outbound IP address is this case is 20.115.24.20. This is the static IP address. You can also create more IP addresses.

 

 

 

7. Test with the NAT Gateway Linked

  • Invoke the workflow first and make the outbound call after configuring the NAT Gateway for testing/checking which IP address is returned.
  • In this case, the IP address that was returned by the service is 20.114.24.20
  • The IP address is the Public IP address configured on the NAT Gateway, so the traffic has been routed through that.

 

 

 

Conclusion

 

Logic Apps Standard can be integrated with a Virtual Network, which in turn can be integrated with a NAT Gateway. This helps with routing traffic on built-in connectors through the NAT Gateway, using the static IP(s) defined as the outbound IP. In this tutorial, I have created only 1 static IP, but it is possible to create more on the NAT Gateway, which will allow the Logic App's traffic to route through either one.

Updated Feb 27, 2023
Version 1.0
  • I have followed this article and I setup the Outbound IP address for Logic app. In a workflow, I am using SFTP Connector for transferring some files. The problem is the Connector uses a separate IP address and it's not using the IP address of the VNet, which totally defeats the purpose of the whole process

     

    Is there a way to use the VNet Ip address for the connector or use the IP address for all things this Logic app

     

    Thanks

    Ramesh

  • EdenD0103's avatar
    EdenD0103
    Copper Contributor

    Hi rameshkrishnankkdi , how did you solve this issue?  I'm doing the same thing but my issue is that my SQL Server connection is not working using the Static IP Address of the logic apps.

  • EdenD0103 ,

    Unfortunately, the connectors (including sql connector's has their separate IP addresses) which I was unable to whitelist. So, We went with Function app and it uses one Static IP address and we were able to whitelist)

     

    Hopefully that helps

  • EdenD0103's avatar
    EdenD0103
    Copper Contributor

    Hi rameshkrishnankkdi , thanks for that.  It didn't solve my issue but at least now I know that it won't work.  Thank you very much.  You've been helpful.