How to override VNET

Thandisizwe Jack 0 Reputation points
2026-09-09T12:12:53.87+00:00

Is this ok to override default routes for the vnet injected Azure API Management instance towards the Hub firewall? As per the Hub and Spoke Design. I am required to use APIM in Internal Mode (Vnet Injected) with an internal App Gateway in its front

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


2 answers

Sort by: Newest
  1. Thandisizwe Jack 0 Reputation points
    2026-09-09T12:14:04.1866667+00:00

    Yes, but not as a blanket forced-tunnel without exceptions.

    For an Azure API Management instance deployed in internal mode inside a VNet, sending all outbound traffic from the APIM subnet to an on-premises firewall or hub firewall by using a default route (0.0.0.0/0) can break APIM connectivity. This happens when outbound traffic is blocked or NATed in a way that no longer works with required Azure endpoints.

    Supported guidance is:

    If a default route from the APIM subnet points to the hub firewall or another network virtual appliance, enable service endpoints on the APIM subnet for these dependent services: Azure SQL Azure Storage Azure Event Hubs Azure Key Vault With those service endpoints enabled, traffic from APIM to those Azure services uses the Azure backbone and is not force tunneled. Any remaining APIM dependency traffic that is still force tunneled must be explicitly allowed through the firewall or virtual appliance. If that traffic is blocked, APIM might not function correctly. If the requirement is to force tunnel all traffic from the APIM subnet, the firewall or virtual appliance must allow the complete IP address range of each dependent service and that configuration must be kept current as Azure infrastructure changes. Be aware that force tunneling APIM traffic can introduce latency or unexpected timeouts. For a hub-and-spoke design with APIM internal mode behind an internal Application Gateway, overriding the APIM subnet default route toward the hub firewall is therefore acceptable only when the APIM service dependencies are handled correctly. The safer documented pattern is to use service endpoints for the supported dependencies and ensure the hub firewall allows the remaining required outbound traffic.

    Was this answer helpful?


  2. AI answer

    2026-09-09T12:13:10.4466667+00:00

    Yes, but not as a blanket forced-tunnel without exceptions.

    For an Azure API Management instance deployed in internal mode inside a VNet, sending all outbound traffic from the APIM subnet to an on-premises firewall or hub firewall by using a default route (0.0.0.0/0) can break APIM connectivity. This happens when outbound traffic is blocked or NATed in a way that no longer works with required Azure endpoints.

    Supported guidance is:

    1. If a default route from the APIM subnet points to the hub firewall or another network virtual appliance, enable service endpoints on the APIM subnet for these dependent services:
      • Azure SQL
      • Azure Storage
      • Azure Event Hubs
      • Azure Key Vault
    2. With those service endpoints enabled, traffic from APIM to those Azure services uses the Azure backbone and is not force tunneled.
    3. Any remaining APIM dependency traffic that is still force tunneled must be explicitly allowed through the firewall or virtual appliance. If that traffic is blocked, APIM might not function correctly.
    4. If the requirement is to force tunnel all traffic from the APIM subnet, the firewall or virtual appliance must allow the complete IP address range of each dependent service and that configuration must be kept current as Azure infrastructure changes.
    5. Be aware that force tunneling APIM traffic can introduce latency or unexpected timeouts.

    For a hub-and-spoke design with APIM internal mode behind an internal Application Gateway, overriding the APIM subnet default route toward the hub firewall is therefore acceptable only when the APIM service dependencies are handled correctly. The safer documented pattern is to use service endpoints for the supported dependencies and ensure the hub firewall allows the remaining required outbound traffic.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.