Optimizing Azure Firewall: Avoiding Unintended VNET-to-VNET Traffic
We want to share an important best pracice with anyone that manages or implements Azure firewalls. Special thanks to the findings and valuable input from my colleague Gert Jan Huisman.
🤔 The Problem:
Azure Firewall rules are processed based on priority (from 0 to 64999). As of writing, there is no specific alias for designating public internet traffic. This can inadvertently allow traffic between VNETs.
🚨 Risk:
The risk arises when someone tries to route traffic from a VNET to the internet and uses "*" (any) in the destination field. While this allows traffic to the internet, it also permits traffic to other networks (VNETs) within Azure. This can pose a significant security risk if not intended and not mitigated by another rule.
🛠️ Proposed Solution:
Create a Rule Collection Group named 'Internet-Access' with priority 64900 and add the following Rule Collections:
By following this structure, you can add an extra layer of security and prevent unintended VNET to VNET traffic. If you do need VNET to VNET traffic, create a specific rule with a higher priority (e.g., 1001).
Have questions or want to know more? Feel free to send me a message or leave a comment.
This may seem like a good idea but what about a high priority rule that permits access from one vnet to a private endpoint (UDR enabled) in another vnet via application rules (SNAT requirement) in Azure firewall. The low priority rule deny-private-ranges as a network rule will deny this traffic because network rules are applied first.
Senior Consultant | Web & Mobile Software Development at Sparkhound
1yGreat timing on this post! I was configuring Azure Firewall Policy rules today and implemented your proposed best practice. Thanks! 😊