Azure Firewall vs WAF: they protect different things (and you often need both).
These two show up in the same architecture diagrams and get treated as rivals, so people burn a day arguing which to buy. Wrong frame — they guard different layers, and the honest answer for most public apps is that you run both.
New to cloud? CAMPUX is a free, build-first course. Start here →
Azure Firewall is a network firewall: it works at layers 3 and 4, with FQDN filtering for outbound web traffic, and controls what flows in and out of your virtual networks across all ports and protocols. A Web Application Firewall (a WAF, running on Application Gateway or Front Door) works at layer 7, inspecting HTTP requests for application attacks like SQL injection, XSS, and the rest of the OWASP list. Different layers, different jobs; serious apps run both. The shape below is stable; where an exact number or edge case drives your design, verify it against the Microsoft docs at the end rather than trusting my paraphrase.
Why people confuse them
Both have "firewall" in the name, both are security products, and both can sit on the inbound path to your app. That is enough surface similarity to make a beginner assume they are two brands of the same thing and that picking one is a budget decision. It is not. The word "firewall" is doing too much work — it covers everything from a packet filter that only looks at IP addresses and ports up to a device that reads the body of an HTTP POST. Azure Firewall and a WAF live at opposite ends of that range.
The cleanest way to keep them straight is to ask what each one reads. Azure Firewall reads network-level facts: source IP, destination IP, port, protocol, and, for outbound web traffic, the domain name being requested. A WAF reads the actual HTTP request: the URL, the headers, the query string, the body. A firewall can tell that a packet is headed for port 443 on your web server and decide whether to allow it. Only the WAF can open that request and notice it carries ' OR 1=1-- in a form field. Same packet, two very different questions — and each control can only answer one of them.
Ask what each one reads. The firewall reads IPs and ports; the WAF reads the HTTP request itself.
The comparison, side by side
Below is the distinction laid out the way you would want it in an exam or an architecture review. The values match Microsoft's own positioning of the two products.
| Dimension | Azure Firewall | WAF |
|---|---|---|
| Layer | Network — layers 3–4, plus FQDN filtering for outbound HTTP/S | Application — layer 7, HTTP/HTTPS |
| Protects against | Unwanted network traffic: bad IPs, disallowed ports/protocols, outbound access to untrusted destinations | Web-app exploits: SQL injection, cross-site scripting, and the rest of the OWASP Top 10 |
| Sits where | At the network edge, usually in a hub virtual network, inspecting traffic to and from your networks | In front of the web app, on Application Gateway (regional) or Front Door (global) |
| Traffic it sees | All ports and protocols, both directions, plus east-west traffic between subnets | Only inbound HTTP and HTTPS to the app behind it |
| Typical use | Central control of outbound access, non-web protocols (RDP, SSH, FTP), segmentation between spokes | Shielding a public website or API from injection and scripting attacks |
Own the mistake: it is not either/or
The costly misread is thinking one replaces the other — that a WAF makes the firewall redundant because "it is also a firewall," or that Azure Firewall covers you because "it inspects traffic." Neither is true, and you can see why from the table. A WAF only ever looks at inbound HTTP to the app it fronts. It has nothing to say about a compromised VM beaconing out to a command-and-control server on some random port, or an admin exposing RDP to the internet, or one subnet reaching another it should never touch. That is the firewall's territory.
Go the other way and the gap is just as wide. Azure Firewall watches the network, but it does not parse the web request for you. An attacker sending a perfectly valid HTTP request — right port, right protocol, allowed source — carrying a SQL injection payload sails straight through a network firewall, because at the network layer nothing is wrong. Only a WAF, reading that request against the OWASP Core Rule Set, catches it. The two failure modes do not overlap, which is exactly why Microsoft's guidance is to use them together for a defense-in-depth posture rather than to choose between them.
If your comparison is really "network firewall versus a simpler access control," that is a different question — see NSG vs Azure Firewall, which pits network security groups against the full firewall. And if you are weighing the two places a WAF can live, Application Gateway WAF covers the regional-versus-global choice in detail.
Picture the common hub-and-spoke: Azure Firewall lives in the hub, and every spoke routes its outbound and cross-network traffic through it — that is your central chokepoint for network policy. The public app, though, is fronted by an Application Gateway or Front Door with a WAF policy attached, so inbound web requests hit the WAF first and get inspected before touching the backend. One guards the perimeter and the internal seams; the other stands directly in the doorway of the web app. They are in different places doing different work, which is the whole point.
Does the firewall's Premium tier change the answer?
A fair objection: Azure Firewall Premium adds TLS inspection and an IDPS (intrusion detection and prevention system), so does it start doing the WAF's job? Not really. Premium's IDPS matches traffic against a signature set to spot known exploits and malware patterns, and TLS inspection lets it see inside encrypted flows it otherwise could not. That is more capable than the standard tier, but it is still signature-based network inspection, not the request-parsing an application firewall does against the OWASP rule set. Premium raises the floor on network threats; it does not turn the box into a WAF. If you want the detail on what that tier actually buys, Azure Firewall Premium and IDPS goes through it.
So the honest shape stands. For a public web app that matters, you put a WAF in front of it and Azure Firewall around the network, and Premium is a separate decision about how deep you want the network inspection to go — not a way to collapse the two into one.
The takeaway
Stop framing Azure Firewall and a WAF as competitors. Azure Firewall is a network firewall that decides what traffic may cross into and out of your networks; a WAF is an application firewall that reads HTTP requests and blocks web-app attacks before they reach your code. One protects the network, the other protects the application, and the threats they stop do not overlap. For anything internet-facing and worth defending, the design is not "pick the better one" — it is both, each in its own place. Once you frame it that way, the whole "versus" argument dissolves: you were never choosing between two answers to the same question, you were looking at two answers to two different questions that both need answering.
Questions people also ask
What is the difference between Azure Firewall and WAF?
Azure Firewall is a network firewall. It works at layers 3 and 4 — plus FQDN filtering for outbound web traffic — and controls what can flow in and out of your virtual networks across all ports and protocols. A Web Application Firewall works at layer 7, inspecting the content of HTTP and HTTPS requests to block application attacks such as SQL injection and cross-site scripting before they reach your web app. Different layers, different jobs.
Do I need both Azure Firewall and a WAF?
For a serious public-facing app, usually yes. They cover different threats and neither substitutes for the other. Azure Firewall controls network traffic in and out of your environment — outbound access, non-HTTP protocols like RDP and SSH, east-west traffic between subnets. A WAF sits in front of the web app and reads the HTTP payload for application-layer attacks the firewall never inspects. Microsoft's own guidance is to use them together, not to pick one.
Is Azure Firewall a WAF?
No. Azure Firewall is a network firewall, not a web application firewall. It can filter outbound HTTP and HTTPS by fully qualified domain name and, on the Premium tier, do TLS inspection and intrusion detection, but it does not parse HTTP requests for application attacks like SQL injection or XSS. That is the WAF's job, and the WAF runs on Application Gateway or Front Door, not on Azure Firewall.
Where does the WAF sit in Azure?
A WAF runs on a delivery service that terminates HTTP: Azure Application Gateway for a regional app, or Azure Front Door for a global, edge-distributed one. It sits directly in front of the web application, so inbound web traffic passes through it and gets inspected before reaching your backend. It is not a standalone resource you deploy on its own — you attach a WAF policy to the Application Gateway or Front Door.
Does Azure Firewall protect against SQL injection?
Not on its own. SQL injection is an application-layer attack carried inside a valid HTTP request, and blocking it requires reading the request body against a rule set — that is what a WAF does with the OWASP Core Rule Set. Azure Firewall operates mainly at the network layer; even its Premium IDPS looks for known signatures rather than parsing web-app payloads. To stop SQL injection you put a WAF in front of the app.