How does NSG capture flows intra vnet traffic to different snet

Pirko, Kevin J 5 Reputation points
2023-02-13T16:23:15.98+00:00

Hey so I have a vnet with two snet. one snet is an app service vnet integrate for outbound traffic and a snet with private endpoints to sql server that host the app service database. While I have confirmed the NSG applied to both snet can deny the DB traffic but the traffic analytics and AzureNetworkAnalytics_CL logs shows none of those flows. Is this by design or am I missing a setting somewhere?

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,055 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,267 questions
Azure Network Watcher
Azure Network Watcher
An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.
161 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,261 Reputation points Microsoft Employee
    2023-03-02T07:24:41.7133333+00:00

    Hello @Pirko, Kevin J ,

    I understand that you have a Vnet with two subnets, where one subnet is an app service with Vnet integration and another subnet with private endpoints to SQL server that host the app service database. You have confirmed that the NSGs applied to both subnets can deny the traffic but the traffic analytics and AzureNetworkAnalytics_CL logs doesn't show any of those flows and you would like to know if this is by design.

    Yes, this is by design.

    According to NSG flow logs document,

    Traffic across a private link - To log traffic while accessing platform as a service (PaaS) resources via private link, enable NSG flow logs on the network security group of the subnet that contains the private link. Because of platform limitations, only traffic at the source VMs can be captured. Traffic at the destination PaaS resource can't be captured.

    Refer: https://video2.skills-academy.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview#traffic-across-a-private-link

    Also, App services deployed under an Azure App Service plan don't support NSG flow logs. Because of the nature of how virtual network integration operates, the traffic from virtual network integration doesn't show up in Azure Network Watcher or NSG flow logs.

    Refer: https://video2.skills-academy.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview#incompatible-services

    https://video2.skills-academy.com/en-us/azure/virtual-network/nat-gateway/troubleshoot-nat-and-azure-services#azure-app-services

    In your setup, you have App service and private link with Paas services which do not support/capture NSG flow logs.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments