Azure Firewall has started NATing random traffic flows between VMs

Duncan Sinclair 0 Reputation points
2024-09-03T10:06:08.6933333+00:00

Our monitoring system found a web site not responding last Saturday morning (24th August). Logs showed that it could no longer talk to its database.

The web site is running on a VM -- VM1. The SQL Server is on VM2.

They are on different subnets of the same Vnet, but routed through a 'premium' Azure firewall.

Rules on the firewall, and subnet NSGs allowed traffic, and the activity logs showed there have been no changes to this.

Firewall logs showed traffic was being allowed.
Examining NSG flow logs for the two subnets showed that traffic was leaving VM1's subnet successfully (we also saw this on the firewall logs) but the flow log on VM2's subnet did not show this traffic - at least not exactly.

Instead it showed SQL traffic from the firewall's IP addresses being blocked by the NSG as we wouldn't expect SQL traffic to come from the firewall.
It appears that the firewall is incorrectly NAT'ing this traffic flow. (But not non-SQL traffic between the same two hosts.)

Allowing SQL traffic from the IP addresses of the firewall allowed connectivity to be restored between the two VMs.

Since then we have come across a second flow between two different VMs and on port 443 that also seems to be incorrectly NAT'ed by the firewall.

Anyone got any suggestions as to how we could fix this?

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
671 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 46,096 Reputation points Microsoft Employee
    2024-09-03T11:34:28.9966667+00:00

    @Duncan Sinclair ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    • Can you confirm if the SNAT is "Random" or "Happening always suddenly" ?
    • Is this happening only with the above environment
      • WebVM to DB VM
      • or there are other traffic exhibiting this behavior as well
    • It is possible that SNAT private IP address ranges is configured to SNAT VNet traffic as well (assuming the VNET is using RFC 1918 ranges)
    • Can you share a screenshot of what this setting is?
    • Can you confirm Auto-learn SNAT routes preview is not enabled ?

    Cheers,

    Kapil


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.