Selective Traffic Routing Through NAT Gateway in Azure App Service
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:
- Created a VNet in the same region as the App Service.
- Created multiple subnets.
- Integrated the App Service's outbound connection with a specific subnet in the VNet.
- Enabled the "Route All" option.
- 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.