Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Azure App Service on Linux with regional VNet integration cannot produce a supported platform-generated NSG deny record for that individual connection; obtaining enforcement evidence requires moving the deny to a customer-controlled, logging-capable firewall or network virtual appliance (NVA).
Evidence available in the current topology
| Requested evidence | Available from the App Service/NSG path? |
|---|---|
| TCP five-tuple for the denied attempt | No |
| NSG and rule that enforced the deny | No per-attempt record |
| UTC deny-event timestamp and precision | No |
| Pre-/post-SNAT tuple correlation | No supported record from which to correlate |
| Application-side timestamps or packet capture | Yes, but not proof of NSG enforcement |
| Effective-rule or simulated-rule result | Yes, but not proof that the attempt reached that rule |
Although an NSG on the integration subnet can block App Service outbound traffic, the virtual interfaces used by App Service workers are not customer-accessible resources.^1^ More specifically, Microsoft documents that:
- App Service plans do not support NSG flow logs.^2^
- App Service plans do not support VNet flow logs.^3^
- App Service VNet-integration traffic does not appear in Network Watcher or NSG flow logs because of how the integration operates.^4^
Therefore, the VNet-flow-log fields that would ordinarily contain the tuple, deny state, ACL/rule identifier, and event time are unavailable for this workload. Where supported, those logs are collected at one-minute intervals and include a UNIX-epoch flow timestamp, but that format and collection behavior cannot be applied to App Service here.^3^
NSG diagnostics does not close the gap: it simulates a supplied flow and reports which rule would allow or deny it. Its supported targets are VMs, NICs, VM scale-set NICs, and certain Application Gateway v2 deployments—not App Service.^5^ Even for a supported target, simulation is not an observation of the actual connection attempt.
No documented public App Service diagnostic or support-assisted trace provides the requested NSG enforcement artifact. A support case can investigate unexpected platform behavior, but it should not be treated as a supported way to obtain an otherwise unavailable per-flow audit record.
What a container-side capture can establish
A capture taken inside the custom container can preserve its local five-tuple and show whether a SYN was emitted. It cannot show that the integration-subnet NSG received the packet, identify the matching NSG rule, or distinguish an NSG drop from a later routing or filtering drop.
Microsoft’s documented Linux App Service tcpdump procedure applies to Linux apps that do not use a custom container.^6^ For your custom container, any included capture tooling remains application-side evidence only.
Architectural alternative: enforce and log the deny downstream
For auditable per-attempt enforcement, place a logging-capable Azure Firewall or NVA in the outbound path:
- Enable Route All for the App Service VNet integration so public-destination traffic enters the VNet.
- Associate a route table with the delegated integration subnet.
- Add a UDR for the controlled destination—or
0.0.0.0/0—whose next hop is the firewall/NVA private IP. App Service supports UDRs on its integration subnet.^1^ - Do not let the integration-subnet NSG deny this test tuple. Change that specific rule to allow, narrow its scope, or add a higher-priority allow for the controlled endpoint. Otherwise, the NSG drops the packet before the logging component sees it. Unrelated NSG rules can remain.
- Configure the deny on the firewall/NVA and enable its diagnostic logging before running the test.
- Verify beforehand that the selected product records:
- UTC timestamp and documented precision
- source and destination IP and port
- protocol and action
- matching policy/rule identity
- translation/session data sufficient to map pre-NAT and post-NAT tuples
- Run one uniquely identifiable attempt and correlate it using the application’s UTC interval and tuple.
A UDR to a firewall/NVA overrides other outbound methods, including NAT Gateway.^7^ This design requires permission to deploy/configure the enforcement resource and modify the integration subnet’s route table and App Service routing. It also adds firewall/NVA and log-ingestion costs.
The available documentation does not specify an Azure Firewall diagnostic category, query, timestamp precision, or guaranteed pre-/post-NAT field mapping for this exact requirement. Those details must be validated against the selected enforcement product before treating its logs as compliance evidence.
References
- Integrate your app with an Azure virtual network
- Flow logging for network security groups
- Virtual network flow logs
- Troubleshoot outbound connectivity with NAT gateway and Azure services
- NSG diagnostics overview
- Troubleshoot virtual network integration with Azure App Service
- Outbound internet access: control egress from Azure (modernize)