Azure APIM in Internal VNet Mode Front-ended by CloudFlare

Taranjeet Malik 611 Reputation points
2025-08-09T02:02:57.5866667+00:00

Hi

We have an Azure APIM instance deployed in internal VNet mode (no Private Endpoint enabled). It is front-ended by CloudFlare SaaS solution. The consumers of the APIs hit a Public DNS 'A' record that points to CloudFlare, which then forwards the query to APIM instance over the ExpressRoute. The source address is translated / changed to CloudFlare IP address range, which is a set of Public IPs provided by CluodFlare. This means, when the request reaches the APIM instance, it has a source IP as one of the Public IP addresses from the CloudFlare range. Here's the exact flow of traffic:

Ineternet Client making request to Public URL--> Hits CludFlare--> Source address translated by CloudFlare--> Firewall (allows traffic from CloudFlare to APIM)--> Cloud Router--> ExpressRoute--> ExpressRoute Gateway (Hub VNet)--> Azure Firewall (Hub VNet)--> APIM (Spoke VNet)

We're currently, experiencing a problem: The client making request is getting HTTPS error 522 (Connection timed out). Azure Firewall is showing the "allow" rules triggered at the time of client making the request, however, nothing is logged at APIM showing incoming request (App Insights). There's no activity recorded in the VNet Flow logs on the spoke VNet (where APIM is deployed).

Can someone please share their experience with the similar setup? What areas to investigate, suggested troubleshooting steps?

Thanks

Taranjeet Singh

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ievgen Zasid 75 Reputation points
    2025-08-11T19:45:37.2466667+00:00

    Hello @Taranjeet Malik ,

    Based on the information provided above, I'd check the following

    1. If you route to APIM FQDN but not IP address - check if there is a DNS resolver configured for APIM FQDN.
    2. Ensure CloudFlare is routed to APIM public FQDN/IP address. "publicNetworkAccess": "Enabled", configuration should be enabled on APIM side.
    3. Ensure APIM VNet is peered with Hub VNet
    4. Check APIM Subnet NSG it it allows Ingress traffic from CloudFlare IP CIDR
    5. If you have any custom UDRs ensure if there is symmetric routing is configured.

    Please mark my comment as accepted answer if that helps you or let me know if you have any additional questions/concerns.


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.