Selective Traffic Routing Through NAT Gateway in Azure App Service

Mithila Lishan 71 Reputation points
2024-09-10T11:32:51.19+00:00

When using Azure App Service, multiple outbound public IP addresses are assigned. This creates a challenge when accessing certain external services, as the service provider needs to whitelist multiple public IPs. To solve this, I plan to integrate the App Service with a NAT Gateway, routing specific outbound traffic through the gateway. I believe this will address the issue.

However, in my scenario, the App Service invokes multiple external services, but I only want one specific service to use the NAT Gateway, while keeping existing connections for other services unchanged.

Based on the documentation, these are the steps I am planning to implement:

  1. Created a VNet in the same region as the App Service.
  2. Created multiple subnets.
  3. Integrated the App Service's outbound connection with a specific subnet in the VNet.
  4. Enabled the "Route All" option.
  5. Created a NAT Gateway based on the same VNet and subnet.

With this configuration, however, all outbound traffic is routed through the NAT Gateway. I need a solution that allows only specific traffic to be routed through the NAT Gateway while keeping the rest of the traffic unchanged.

followed documentation -

https://video2.skills-academy.com/en-us/azure/app-service/overview-nat-gateway-integration
https://video2.skills-academy.com/en-us/azure/app-service/overview-vnet-integration

Could you please provide a solution or point me to any resources that might help resolve this issue? Any assistance would be greatly appreciated.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,902 questions
0 comments No comments
{count} votes

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.