Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I understand that you would like to understand about how routing works with Azure Firewall.
I would like to highlight a fact here,
- In case you have a route "0.0.0.0/0" attached to subnets, Subnet-to-Subnet traffic will not go via Azure Firewall.
- This is because System default routes (the address range of the VNet, for e.g. 10.0.0.0/16) have longest prefix match
- In order for Subnet-to-Subnet traffic to flow via Azure Firewall, you should create subnet specific routes, such as 10.0.1.0/24 -----> NVA, 10.0.2.0/24 -----> NVA
Since subnets are associated, all outbound traffic from vm's will be blocked by default. True and confirmed
- By "outbound", if you refer to "Internet" destined traffic, then yes, your observation is correct.
- Also, you should not have any "Allow All" rule in your Azure Firewall, only then the "Deny by default" feature of Azure Firewall will block the traffic.
Will the VM's be able to communicate with each other internally over ports say, 80, 443, 445, 27017, 1433 etc by default? or do I have to define the network rules specifically (source-destination-over port-protocol) in Azure Firewall to enable the communication?
- Make sure the Subnet-to-Subnet traffic is indeed flowing via Azure Firewall
- If so, "No" - traffic will be blocked by default.
- You have to explicitly create network rules specifically to allow traffic in these ports. Else, traffic will be blocked.
Is it due to default 'AllowVnetInBound' NSG rule? Do I have to deny and open specific ports in Azure firewall network rules?
- While default NSG rule allows any subnet-to-subnet traffic, it gets processed after Azure Firewall
- So, if AzFW blocks the traffic, NSG is not even in the picture.
- P.S : You must allow the traffic in NSG as well for traffic to flow.
Thanks,
Kapil
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.