Home

Awesome

Traffic Flows in Common Azure Networking Patterns

Overview

A foundational decision an organization will make when adopting Azure is settling on a networking architecture. The Microsoft Azure Cloud Adoption Framework and Azure Architecture Center can help you to align your organizational requirements for security and operations with the appropriate architecture. While these resources do a great job explaining the benefits and considerations of each architecture, they often lack details as to how a packet gets from point A to point B.

The traffic flows documented in this repository seek to fill this gap to provide the details of the packet flow and the options available to influence these flows to achieve security and operational goals. Additionally, they can act as a tool for learning the platform and troubleshooting issues with Azure networking.

The term NVA (network virtual appliance) is used in this repository to reference a security appliance, most commonly a next-gen firewall. NVAs will typically have a separate management interface in a dedicated management subnet which is not shown in these images. Examples of common NVAs used in Azure include Azure Firewall, Palo Alto, Fortinet, and Imperva.

For the purposes of this repository:

There are many viable patterns in Azure and this repository does not contain them all. Its goal is to document the most common packet flows to help aid in the understanding of Azure networking.

Patterns

Hub and Spoke with single NVA stack for all traffic

General Patterns

HTTP/HTTPS Patterns

Hub and Spoke with separate NVA stacks for east/west and north/south traffic

General Patterns

Hub and Spoke with Single NVA Stack for all traffic

The patterns in this section assume the organization is deploying a single NVA stack that will handle north/south and east/west traffic. Each NVA is configured with three network interfaces. The first interface handles internal traffic (to and from on-premises to Azure or between Azure virtual networks). The second interface handles external traffic (to and from the Internet). The third interface, which is not pictured in these images, is used for management of the NVA.

Single NVA On-premises to Azure

Scenario: Machine on-premises initiates a connection to an application running in Azure.

HS-1NVA-Basic-Flow-Image

StepPathDescription
1A -> BMachine traffic passes over ExpressRoute circuit to Virtual Network Gateway
2B -> FUser defined route in route table assigned to GatewaySubnet directs traffic to internal load balancer for NVA
3F -> EInternal load balancer passes traffic to private interface for NVA
4E -> GNVA evaluates its rules, allows traffic, and passes it to internal load balancer for frontend application
5G -> HInternal load balancer for frontend application passes traffic to frontend application virtual machine
6H -> FUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for NVA
7F -> EInternal load balancer passes traffic to originating NVA's private interface to preserve traffic symmetry
8E -> BNVA passes traffic to Virtual Network Gateway
9B -> AVirtual Network Gateway passes traffic over ExpressRoute circuit back to machine on-premises

Single NVA Azure to Azure

Scenario: Virtual machine in one spoke initiates connection to virtual machine in another spoke.

HS-1NVA-Basic-Flow-Image

StepPathDescription
1H -> FUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for NVA
2F -> EInternal load balancer passes traffic to NVA's private interface
3E -> KNVA evaluates its rules, allows traffic, and passes it to Active Directory domain controller virtual machine
4K -> FUser defined route in route table assigned to domain controller subnet directs traffic to internal load balancer for NVA
5F -> EInternal load balancer passes traffic to originating NVA's private interface to preserve traffic symmetry
6E -> HNVA passes traffic back to frontend virtual machine

Single NVA Azure to Internet using Public IP

Scenario: Virtual machine in Azure initiates a connection to a third-party website on the Internet and the NVA is configured with public IPs.

HS-1NVA

StepPathDescription
1H -> FUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for NVA
2F -> EInternal load balancer passes traffic to NVA's private interface
3E -> DNVA evaluates its rules, allows traffic, routes to its public interface
4D -> @Public interface NATs to its public IP and traffic is routed over the Internet to the third-party website
5@ -> DThird-party website passes traffic back to public IP of NVA's public interface
6D -> ENVA passes traffic rom its public interface to its private interface
7E -> HNVA passes traffic back to frontend virtual machine

Single NVA Azure to Internet using NAT Gateway

Scenario: Virtual machine in Azure initiates a connection to a third-party website on the Internet and the NVAs are configured to use NAT Gateway.

HS-1NVA

StepPathDescription
1H -> FUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for NVA
2F -> EInternal load balancer passes traffic to NVA's private interface
3E -> DNVA evaluates its rules, allows traffic, routes to its public interface
4D -> MPublic interface routes traffic to NAT Gateway via System Route
5M -> @NAT Gateway NATs to its public IP and traffic is routed over the Internet to the third-party website
6@ -> MThird-party website passes traffic back to public IP of NAT Gateway
7M -> DNAT Gateway passes traffic back to NVA's public interface
8D -> ENVA routes traffic from its public interface to its private interface
9E -> HNVA passes traffic back to frontend virtual machine

Single NVA Internet to Azure Http and Https Option 1 Virtual Machines

Scenario: User on the Internet initiates a connection to an application running in Azure. The application has been secured behind an Application Gateway for intra-region security and application-layer load balancing. The Application Gateway is located in the transit virtual network and is provided as a centralized service to all workloads. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> OUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2O -> NAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3N -> MApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4M -> GApplication Gateway passes traffic from its internal interface to the internal load balancer for the web frontend
5G -> HInternal load balancer passes traffic to the web frontend virtual machine
6H -> MWeb frontend virtual machine passes traffic to the Application Gateway private IP
7M -> NApplication Gateway NATs to it's public IP
8N -> OApplication Gateway passes traffic to Azure Front Door
9O -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Http and Https Option 2 Virtual Machines

Scenario: User on the Internet initiates a connection to an application running in Azure. The application has been secured behind an Application Gateway for intra-region security and load application-level balancing. The Application Gateway is located in the workload virtual network and is dedicated to the workload. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> OUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2O -> NAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3N -> MApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4M -> GApplication Gateway passes traffic from its internal interface to the internal load balancer for the web frontend
5G -> HInternal load balancer passes traffic to the web frontend virtual machine
6H -> MWeb frontend virtual machine passes traffic to the Application Gateway private IP
7M -> NApplication Gateway NATs to it's public IP
8N -> OApplication Gateway passes traffic to Azure Front Door
9O -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Http and Https with IDS IPS Option 1 Virtual Machines

Scenario: User on the Internet initiates a connection to an application running in Azure. The application has been secured behind an Application Gateway for intra-region security and load balancing. The Application Gateway is located in the transit virtual network and is provided as a centralized service to all workloads. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration. An NVA is placed between the Application Gateway and the application to provide IDS/IPS functionality.

Reference the public documentation for additional ways to achieve this pattern.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> OUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2O -> NAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3N -> MApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4M -> FUser defined route in route table assigned to Application Gateway subnet directs traffic from Application Gateway internal interface to internal load balancer for NVA
5F -> EInternal load balancer passes traffic to private interface for NVA
6E -> GNVA evaluates its rules, allows traffic, and passes it to internal load balancer for frontend application
7G -> HInternal load balancer passes traffic to the web frontend virtual machine
8H -> FUser defined route in route table assigned to web frontend subnet directs traffic to the internal load balancer for the NVA
9F -> EInternal load balancer passes traffic to the NVA
10E -> MNVA passes traffic to the Application Gateway internal interface
11M -> NApplication Gateway NATs to it's public IP
12N -> OApplication Gateway passes traffic to Azure Front Door
13O -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Http and Https with IDS IPS Option 2 Virtual Machines

Scenario: User on the Internet initiates a connection to an application running in Azure. The application has been secured behind an Application Gateway for intra-region security and load balancing. The Application Gateway is located in the workload virtual network and is dedicated to the workload. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration. An NVA is placed between the Application Gateway and the application to provide IDS/IPS functionality.

Reference the public documentation for additional ways to achieve this pattern.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> OUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2O -> NAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3N -> MApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4M -> FUser defined route in route table assigned to Application Gateway subnet directs traffic from Application Gateway internal interface to internal load balancer for NVA
5F -> EInternal load balancer passes traffic to private interface for NVA
6E -> GNVA evaluates its rules, allows traffic, and passes it to internal load balancer for frontend application
7G -> HInternal load balancer passes traffic to the web frontend virtual machine
8H -> FUser defined route in route table assigned to web frontend subnet directs traffic to the internal load balancer for the NVA
9F -> EInternal load balancer passes traffic to the NVA
10E -> MNVA passes traffic to the Application Gateway internal interface
11M -> NApplication Gateway NATs to it's public IP
12N -> OApplication Gateway passes traffic to Azure Front Door
13O -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Http and Https Option 1 Private Endpoints

Scenario: User on the Internet initiates a connection to an application running in Azure in Azure App Services which has been secured behind a Private Endpoint. The application has been secured behind an Application Gateway for intra-region security and application-layer load balancing. The Application Gateway is located in the transit virtual network and is provided as a centralized service to all workloads. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> NUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2N -> MAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3M -> LApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4L -> HApplication Gateway passes traffic from its internal interface to the private endpoint of the App Service
5H -> LApp Service returns traffic to the Application Gateway private IP
6L -> MApplication Gateway NATs to it's public IP
7M -> NApplication Gateway returns traffic to Azure Front Door
8N -> @Azure Front Door returns traffic to user's machine

Single NVA Internet to Azure Http and Https Option 2 Private Endpoints

Scenario: User on the Internet initiates a connection to an application running in Azure in Azure App Services which has been secured behind a Private Endpoint. The application has been secured behind an Application Gateway for intra-region security and load application-level balancing. The Application Gateway is located in the workload virtual network and is dedicated to the workload. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> NUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2N -> MAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3M -> LApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4L -> HApplication Gateway passes traffic from its internal interface to the private endpoint of the App Service
5H -> LApp Service returns traffic to the Application Gateway private IP
6L -> MApplication Gateway NATs to it's public IP
7M -> NApplication Gateway returns traffic to Azure Front Door
8N -> @Azure Front Door returns traffic to user's machine

Single NVA Internet to Azure Http and Https with IDS IPS Option 1 Private Endpoints

Scenario: User on the Internet initiates a connection to an application running in Azure in Azure App Services which has been secured behind a Private Endpoint. The application has been secured behind an Application Gateway for intra-region security and load balancing. The Application Gateway is located in the transit virtual network and is provided as a centralized service to all workloads. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration. An NVA is placed between the Application Gateway and the application to provide IDS/IPS functionality. Private Endpoint network policies have been enabled on the frontend subnet containing the App Services Private Endpoint enabling improved routing and network security group support.

Reference the public documentation for additional ways to achieve this pattern.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> NUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2N -> MAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3M -> LApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4L -> FUser defined route in route table assigned to Application Gateway subnet directs traffic from Application Gateway internal interface to internal load balancer for NVA
5F -> EInternal load balancer passes traffic to private interface for NVA
6E -> HNVA evaluates its rules, allows traffic, SNATs to its IP, and passes it to the private endpoint for the App Service
7H -> EApp Service returns the traffic to the NVAs private IP
8E -> LNVA passes traffic to the Application Gateway internal interface
9L -> MApplication Gateway NATs to it's public IP
10M -> NApplication Gateway passes traffic to Azure Front Door
11N -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Http and Https with IDS IPS Option 2 Private Endpoints

Scenario: User on the Internet initiates a connection to an application running in Azure in Azure App Services which has been secured behind a Private Endpoint. The application has been secured behind an Application Gateway for intra-region security and load balancing. The Application Gateway is located in the workload virtual network and is dedicated to the workload. Azure Front Door is placed in front of the Application Gateway to provide inter-region security, load balancing, and site acceleration. An NVA is placed between the Application Gateway and the application to provide IDS/IPS functionality. Private Endpoint network policies have been enabled on the frontend subnet containing the App Services Private Endpoint enabling improved routing and network security group support.

Reference the public documentation for additional ways to achieve this pattern.

Benefits of this pattern include:

Considerations of this pattern include:

HS-1NVA

StepPathDescription
1@ -> NUser's machine sends traffic to Azure Front Door which terminates the TCP connection
2N -> MAzure Front Door establishes a new TCP connection with the Application Gateway's public IP and adds the user's public IP to the X-Forwarded-For header
3M -> LApplication Gateway NATs to its private IP, appends the X-Forwarded-Header with the Azure Front Door public IP, performs its security and load balancing function
4L -> FUser defined route in route table assigned to Application Gateway subnet directs traffic from Application Gateway internal interface to internal load balancer for NVA
5F -> EInternal load balancer passes traffic to private interface for NVA
6E -> HNVA evaluates its rules, allows traffic, SNATs to its IP, and passes it to the private endpoint for the App Service
7H -> EApp Service returns the traffic to the NVAs private IP
8E -> LNVA passes traffic to the Application Gateway internal interface
9L -> MApplication Gateway NATs to it's public IP
10M -> NApplication Gateway passes traffic to Azure Front Door
11N -> @Azure Front Door passes traffic to user's machine

Single NVA Internet to Azure Non Http and Https

Scenario: User on the Internet initiates a connection to an application running in Azure. The application is served up using a protocol that IS NOT HTTP/HTTPS. An NVA is placed between the Internet and the application. HS-1NVA

StepPathDescription
1@ -> CUser's machine sends traffic to the public IP address of an external Azure Load Balancer
2C -> DExternal load balancer passes the traffic through the Azure software defined network which preserves the user's machine's public IP as the source and passes it on to the NVA's public interface
3D -> ENVA evaluates its rules, allows traffic, routes the traffic to its private interface and NATs to its private IP
4E -> GNVA passes traffic to the internal load balancer for the web frontend
5G -> HWeb frontend internal load balancer passes traffic to web frontend virtual machine
6H -> EWeb frontend virtual machine passes traffic to NVA's private interface
7E -> DNVA routes traffic from its private interface to its public interface
8D -> @NVA passes traffic back through the Azure software defined network where its source IP address is rewritten to the external load balancer's public IP

Single NVA Cross Region Azure to Azure

Scenario: Workload running in spoke 1 region 1 needs to communicate with workload in spoke 2 region 2. HS-1NVA-CROSS-REGION-AZURE-TO-AZURE

StepPathDescription
1H -> FUser defined route in route table assigned to web frontend subnet directs traffic to the internal load balancer for NVA in region 1
2F -> EInternal load balancer passes traffic to private interface of NVA in region 1
3E -> FFNVA in region 1 evaluates its rules, allows traffic, and user defined route in route table assigned to private interface subnet directs traffic to internal load balancer for NVA in region 2
4FF -> EEInternal load balancer passes traffic to private interface of NVA in region 2
5EE -> GGNVA in region 2 evaluates its rules, allows traffic, and passes it to internal load balancer for frontend application in region 2
6GG -> HHWeb frontend internal load balancer passes traffic to web frontend virtual machine
7HH -> FFUser defined route in route table assigned to web frontend subnet directs traffic to the internal load balancer for NVA in region 2
8FF -> EEInternal load balancer passes traffic to private interface of NVA in region 2
9EE -> FUser defined route in route table assigned to NVA in region 2 private interface subnet directs traffic to internal load balancer of NVA in region 1
10F -> EInternal load balancer passes traffic to private interface of NVA in region 1
11E -> GNVA in region 1 passes traffic to the internal load balancer for the web frontend in region 1
12G -> HWeb frontend internal load balancer passes traffic to web frontend virtual machine

Single NVA with Dual NICs On-premises to Azure

This pattern adds an additional network interface to the NVA to handle east/west traffic. In some NVAs this allows the user to establish separate security zones for each network interface allowing for a more traditional administration experience. It is often adopted by organizations who have not yet adopted traditional processes to cloud.

Organizations should avoid this pattern and instead use a single network interface for all east and west traffic as illustrated in the other patterns in this repository. Using this pattern will introduce significant additional administration overhead because traffic will be passes through separate load balancers attached to the same NVA forcing SNAT to be used. This is due to mismatches in the five-tuple hash algorithm Azure Load Balancers use. This video by John Savill goes into more detail.

Microsoft does not recommend this pattern and organizations should consult with their NVA vendor for best practices on implementing NVAs in Azure.

Note that this pattern does not show the public interface or management interface in this diagram.

Scenario: Machine on-premises initiates a connection to an application running in Azure. HS-1NVA-TWO-NICS

StepPathDescription
1A -> BMachine traffic passes over ExpressRoute circuit to Virtual Network Gateway
2B -> CUser defined route in route table assigned to GatewaySubnet directs traffic to internal load balancer for NVA's untrusted interface
3C -> DInternal load balancer passes traffic to untrusted interface of NVA
4D -> ENVA evaluates its rules, allows traffic, routes to its trusted interface
5E -> GNVA SNATs to its trusted interface IP and passes traffic to internal load balancer for frontend application
6G -> HInternal load balancer for frontend application passes traffic to frontend application virtual machine
7H -> EFrontend application virtual machine passes traffic directly back to NVA's trusted interface
8E -> DNVA routes traffic from its trusted interface to its untrusted interface
9D -> BNVA passes traffic to Virtual Network Gateway
10B -> AVirtual Network Gateway passes traffic over ExpressRoute circuit back to machine on-premises

Hub and Spoke With Separate NVA Stacks

The patterns in this section assume the organization is deploying a separate NVA stack for north/south and east/west traffic. This is done to mitigate the risk of a bottle neck or failure to north/south traffic affecting east/west traffic and vice versa.

The north/south NVAs are configured wwith three network interfaces. The first interface handles private traffic (to and from on-premises to Azure or within Azure). The second interface handles public traffic (to and from the Internet). The third interface, which is not pictured in these images, is used for management of the NVA.

The east/west NVAs are configured with two interfaces. The first interface handles payload traffic (to and from on-premises to Azure or within Azure). The second interface, which is not pictured in these images, is used for management of the NVA.

Dual NVA Azure to Azure

Scenario: Virtual machine in one spoke initiates connection to virtual machine in another spoke. HS-2NVA-Basic-Flows-Image

StepPathDescription
1A -> BMachine traffic passes over ExpressRoute circuit to Virtual Network Gateway
2B -> CUser defined route in route table assigned to GatewaySubnet directs traffic to internal load balancer for east/west NVA
3C -> DInternal load balancer passes traffic to payload interface for east/west NVA
4D -> INVA evaluates its rules, allows traffic, and passes it to internal load balancer for frontend application
5I -> JInternal load balancer for frontend application passes traffic to frontend application virtual machine
6J -> CUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for east/west NVA
7C -> DInternal load balancer passes traffic to originating east/west NVA's payload interface to preserve traffic symmetry
8D -> BNVA passes traffic to Virtual Network Gateway
9B -> AVirtual Network Gateway passes traffic over ExpressRoute circuit back to machine on-premises

Dual NVA Azure to Internet using Public IP

Scenario: Virtual machine in Azure initiates a connection to a third-party website on the Internet and the NVA is configured with public IPs. HS-2NVA-Basic-Flow

StepPathDescription
1J -> HUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for north/south NVA
2H -> GInternal load balancer passes traffic to north/south NVA's private interface
3G -> FNorth/south NVA evaluates its rules, allows traffic, routes to its public interface
4F -> @Public interface NATs to its public IP and traffic is routed over the Internet to the third-party website
5@ -> FThird-party website passes traffic back to public IP of north/south NVA's public interface
6F -> GNorth/south NVA routes traffic from its public interface to its private interface
7G -> JNorth/south NVA passes traffic back to frontend virtual machine

Dual NVA Azure to Internet using NAT Gateway

Scenario: Virtual machine in Azure initiates a connection to a third-party website on the Internet and the NVAs are configured to use NAT Gateway. HS-2NVA-NAT-GATEWAY

StepPathDescription
1J -> HUser defined route in route table assigned to frontend subnet directs traffic to internal load balancer for north/south NVA
2H -> GInternal load balancer passes traffic to north/south NVA's private interface
3G -> FNorth/south NVA evaluates its rules, allows traffic, routes to its public interface
4F -> MPublic interface routes traffic to NAT Gateway via System Route
5M -> @NAT Gateway NATs to its public IP and traffic is routed over the Internet to the third-party website
6@ -> MThird-party website passes traffic back to public IP of NAT Gateway
7M -> FNAT Gateway passes traffic back to north/south NVA's public interface
8F -> GNorth/south NVA routes traffic from its public interface to its private interface
9G -> JNorth/south NVA passes traffic back to frontend virtual machine