All Blogs

Understanding Security Provided by a Web Application Firewall (WAF)

| Posted on 

Web applications are the first target for many cybercriminals and those attackers look for an entryway through login pages, API endpoints and file upload fields. Traditional network firewalls can’t analyze the content of network traffic to detect and stop these attacks. A Web Application Firewall (WAF) closes the gap. 

A Web Application Firewall inspects, filters and blocks HTTP and HTTPS traffic between users and web applications. It sits in the client-to-web application server traffic path. A WAF examines the content of that traffic: URL parameters, headers, cookies and request bodies, not just the source and destination addresses.

This article explains what WAF security provides and how to think about the right approach for your organization.

What Security Does a WAF Provide?

 A WAF performs three core functions:

          Filters incoming and outgoing traffic using a set of rules.

          Monitors requests and responses for suspicious patterns.

          Blocks traffic that matches known attack signatures or behaves anomalously.

 

That combination lets a WAF stop attacks before they reach the backend application servers, rather than relying entirely on the applications themselves to correctly detect and handle malicious requests and data.

Why WAFs Operate at Layer 7

A WAF operates at Layer 7 of the network model, the application layer. This matters because the application layer is where web traffic (HTTP messages) lives and can be inspected. A traditional firewall can tell that a network packet is headed for port 443. A WAF, on the other hand, can examine the content of such a packet and detect malicious activity, such as when the request data contains a SQL injection payload.

WAF operates at Layer 7 of the network model, the application layer. This matters because the application layer is where web traffic (HTTP messages) lives and can be inspected. A traditional firewall can tell that a network packet is headed for port 443. A WAF, on the other hand, can examine the content of such a packet and detect malicious activity, such as when the request data contains a SQL injection payload.

How a WAF Differs from Other Technologies

Traditional firewalls operate at Layers 2 through 4, filtering traffic based on IP address, port and protocols. They’re effective at blocking unauthorized network access but offer no visibility into what’s inside a connection. A WAF and a traditional firewall address different problems, but network security needs both. They’re distinct technologies that complement each other.

Why WAF Security Matters

Adding WAF security to your defensive posture delivers multiple benefits, such as:

Part of a Defense-in-Depth Model

A WAF acts as one layer in a broader security stack, not as a standalone control. Defense-in-depth means layering independent protections so that a failure in one layer doesn’t leave the application exposed. A WAF handles inspection at the application layer, while network firewalls, access controls and authentication systems cover the rest.

Protecting Sensitive Data

Web applications frequently handle customer data, payment details and internal business information. A WAF helps prevent attackers from compromising that data through vulnerabilities such as SQL injection or by exploiting broken access controls.

Why You Need a WAF: The Rise of App-Based Attacks

Attackers increasingly target the application layer rather than the network perimeter because applications expose a much larger attack surface, such as forms, APIs, file uploads and third-party integrations, each of which is a potential entry point. A WAF gives security teams visibility and control over that surface.

Compliance Requirements

Standards such as PCI DSS v4.0 require a WAF or an equivalent set of controls for any web-facing application that handles payment card data (see PCI DSS v4.0 subsection 6.4.2). PCI DSS auditors typically look for three things: the ability to detect threats, the logging of detection events and the ability to block traffic.

The Mandated WAF

Many teams deploy a WAF because a specific policy or regulatory framework requires it, not because they’ve built a full security program around it. That’s fine as a starting point but adopting a WAF as a proactive addition to improve your web application is a better approach. Progress Kemp LoadMaster WAF, paired with LoadMaster 360 tools, enables non-security personnel to quickly stand up a compliant WAF and then build on it as their program matures.

How WAF Security Works

A WAF uses multiple techniques to boost the security of web applications.

Reverse Proxy Positioning

A WAF typically sits in front of the application as a reverse proxy, intercepting every request before it reaches a backend server. This positioning allows it to inspect traffic and act without requiring changes to any web application code.

Policy- and Rules-Based Filtering

The WAF evaluates each request (and optionally each response, too) against a set of rules and policies. These rules typically define what “normal” traffic looks like and what should trigger a request block, an admin alert and a log entry.

Blocking vs. Allowing Traffic

Depending on how it’s configured, a WAF either blocks anomalous traffic that matches a detection rule (a “negative security model”) or allows only traffic that matches a known-good pattern (a “positive security model”).

A positive security model defines what expected and acceptable traffic looks like and blocks everything else by default (therefore, all unexpected and unacceptable traffic is automatically blocked.) A negative security model takes the opposite approach: it defines what known bad traffic looks like and blocks only that matching traffic. Most WAF deployments use a hybrid of positive and negative security models.

Request Inspection and Threat Detection

A WAF examines request structure, payload content and behavioral patterns, comparing them against rule sets such as the OWASP Core Rule Set to detect attacks, including SQL injection, cross-site scripting, remote code execution attempts and more.

Anomaly Scoring

Rather than blocking when a single detection rule matches, more sophisticated WAFs typically assign an anomaly score (5.5-minute overview video) to a request, accumulating points for each suspicious characteristic. When the score reaches a defined threshold, the WAF acts. This reduces the number of false positives and is much easier to operate compared to strict single-rule blocking.

LoadMaster Web Application Firewall (WAF)

The LoadMaster platform integrates WAF functionality directly into the load balancing platform, using the OWASP Core Rule Set as its foundation. Because the LoadMaster WAF operates as a reverse proxy in conjunction with its load balancing functionality, web traffic is inspected and distributed from a single place rather than needing to deploy security endpoints across all of the back-end servers (the “embedded” WAF deployment model, the opposite of the much simpler reverse proxy model used by LoadMaster).

Managing WAF Security

Ongoing WAF management and operation involves reviewing the logs, adjusting rule sensitivity and tuning away false positives as the application changes over time. This is where automated smart tooling like LoadMaster 360 helps since it provides visibility into what the WAF is catching and flagging without requiring deep security expertise and manual interpretation of the WAF data.

Key WAF Security Features and Capabilities

 A WAF delivers the following key security features:

Threat intelligence - Rule sets that evolve over time to cover new and emerging attack patterns, such as the OWASP Core Rule Set.

Customization and rule creation - Writing custom rules for application-specific logic that generic rule sets don’t cover.

Correlation engines - Connecting related detection events to catch multi-step attacks and resolve complex false positives.

Application delivery controller integration - Combining WAF protection with application delivery to improve both security, scalability and performance.

Organizations that need help configuring or tuning any of these capabilities can draw on training, consulting and professional services rather than building that expertise entirely in-house.

WAF Security Models

As mentioned previously, you can use various security models when deploying and configuring a WAF.

Positive Security Model (Allow-list)

A positive model defines what legitimate traffic looks like and blocks anything that doesn’t match. It provides very strong protection against unknown traffic and attacks but requires upfront work to define allowed traffic patterns and can break legitimate traffic if the baseline is incomplete.

Negative Security Model (Deny-list)

A negative model blocks traffic that matches known attack behaviors and patterns and allows everything else. It’s faster to deploy because it relies on pre-built rule sets, but it can miss new and novel attacks that don’t match an existing pattern or behavior.

Denylist vs. Allowlist: The Difference

A denylist type approach assumes traffic is good unless proven otherwise, it suits general web and application traffic, which can vary. An allowlist approach, on the other hand, assumes traffic is bad unless proven otherwise. Allowlists suit narrow, well-defined applications, where the expected traffic pattern is predictable.

Hybrid Model

Most production deployments use a combination approach: a negative model that broadly detects known attack patterns and a positive model that more tightly secures specific high-value application pages, such as login pages or payment services. This hybrid approach balances deployment speed with protection depth, which is why it’s a common choice in practice.

Modern Use Cases for WAFs

Preventing OWASP Top 10 Vulnerabilities

The OWASP Top 10 identifies the most common and severe web application security risks, including injection attacks, broken access control and security misconfiguration. A properly configured WAF directly addresses these categories and other common attack types.

API Protection

APIs expose application logic directly and may feature less input validation than user-facing web forms. A WAF extends inspection to API traffic, including JSON payloads and authentication tokens, not just traditional HTML form submissions and page requests.

Protecting Microservices and Cloud Apps

Modern applications built as microservices expose many more software endpoints than a traditional monolithic app. A WAF positioned at the edge of that architecture provides a consistent security layer without requiring each microservice to implement its own protection.

WAFs vs. Other Security Tools

WAF vs. Firewall

A traditional firewall filters at the network layer based on IP, port and network protocols. A WAF filters at the application layer based on request content. They protect against different attack vectors.

WAF vs. IDS/IPS 

An intrusion detection or prevention system monitors network-wide traffic for known attack signatures across many protocols. A WAF focuses specifically on HTTP/HTTPS traffic to web applications and APIs, with much deeper and more complex inspection performed. WAFs tend to look for unusual behaviors in web traffic rather than being confined to signature-based detection like an IDS or an anti-virus scanner.

How they complement each other:

Layering a firewall, an IDS/IPS and a WAF covers the network stack, providing broad threat detection and application-specific security. No single tool can provide perfect security or cover every security angle on its own.

Types of WAF Deployment

A WAF deployment can be designed to fit into a diverse range of network architectures and application deployment models. There are three main types of WAFs:

Network-Based WAFs

These typically take the form of a reverse proxy or a load balancer, with a WAF engine built-in and scanning web traffic as it passes through. The LoadMaster WAF falls into this category.

Network-based WAFs run as a standalone machine on the network. They can be deployed on-premises as physical hardware appliances or as virtual machines deployed into a hypervisor or cloud environment.

As they typically sit adjacent to the servers they’re protecting, network-based WAFs deliver low latency and full local control: this can be particularly important when questions around data sovereignty and data protection compliance arise.

Host-Based/Embedded WAFs

A host-based WAF is embedded directly on the web server it's defending. In a multi-server deployment, this has the advantage that the computational load of the WAF layer is naturally distributed across all the active web servers. The downside of having multiple smaller WAFs is that they require an additional layer of tooling and orchestration to manage.

Consider that all the individual log outputs likely need to be amalgamated, the configurations need to be identical and synchronized, WAF rules and their updates need to be pushed out to each node, dashboarding may be required, and so on. The added operational requirements are not insignificant.

Cloud-Based WAFs

Cloud-based WAFs run as a service, typically provided by a public cloud provider or CDN. They can be deployed quickly and have no hardware or virtual machines to manage. Update frequency varies significantly by vendor. Some providers stay on top of emerging threats; others, including major providers, have drawn criticism for lagging behind in detection rule updates by up to several years.

Cloud WAFs are significantly simplified compared to all other types of WAFs and sacrifice features and functionality in the interests of ease of use. This makes them considerably less flexible and they often feature little to no ability for customization. Pricing models are often based on the number of requests or the data volume which can lead to unexpectedly high bills when there are spikes in traffic.

LoadMaster Web Application Firewall (WAF)

The LoadMaster WAF is network-based: directly integrated as part of the load balancer, it delivers predictable performance and cost without the overhead and complexity of an embedded solution, while offering the features, rule customization and flexibility that cloud-only options usually lack.

Best Practices for Implementing WAF Security

Here are some best practices to consider when implementing a WAF solution for security:

  • Choose the right model for your traffic profile - negative for broad coverage, positive for high-value endpoints, hybrid for most production environments.
  • Monitor and tune policies on an ongoing basis rather than treating initial configuration as a one-time task.
  • Reduce false positives by tuning rules and building application-specific exceptions as you learn what normal traffic looks like for your apps.
  • Use platform-level visibility - LoadMaster 360 gives teams a consolidated view of WAF activity across deployments, making tuning far more manageable than digging through text logs by hand.
  • Support DevSecOps workflows by integrating WAF policy changes into existing deployment pipelines rather than managing them as a separate, disconnected process.

Ready to Improve Your WAF Security?

WAFs remain a core part of application security because they address a layer that network firewalls can’t. When paired with the rest of a defense-in-depth strategy, a well-tuned WAF closes off one of the largest attack surfaces that a modern organization exposes to the internet.

Ready to see it in action? Access a free trial:

Easy to deploy and configure - Use configuration templates and deployment guides to get up and running quickly.

Superb customer support 24/7 - Experience our renowned technical support with full access during your trial.

Platform ubiquity - The LoadMaster solution supports more platforms: hardware, virtual and cloud. One WAF configuration can be used across your entire estate, both on-premises and in the cloud.

WAF Security FAQs

What is a Web Application Firewall (WAF)?

A WAF is a security tool that inspects, filters and blocks HTTP/HTTPS traffic between client devices and a web application. It operates at the application layer to catch threats that network-level tools cannot see.

Why is WAF security important for modern applications?

Modern applications expose a large attack surface through web forms, APIs and integrations. A WAF gives security teams visibility and control over that surface, catching attacks before they reach the application code.

How does a WAF differ from a traditional firewall?

A traditional firewall filters at the network layer based on IP, port and protocol. A WAF filters at the application layer based on the contents of a request or conversation.

What types of WAF deployments are available?

Network-based (hardware appliances or virtual machines), host-based/embedded (software within the app or server) and cloud-based (delivered as a service). The LoadMaster load balancing platform contains a network-based WAF and a fully-featured application delivery controller (ADC).

What are the pros and cons of cloud-based WAFs versus on-premises? Cloud WAFs deploy quickly with no hardware to manage, but they offer little to no customization and can produce unpredictable costs at scale. On-premises WAFs cost more upfront and require dedicated infrastructure, but they provide full control and predictable performance. The LoadMaster solution can be deployed both on-premises and in a public cloud, offering maximum flexibility.

How does a WAF protect against OWASP Top 10 vulnerabilities?

By inspecting network traffic for behaviors and patterns associated with injection attacks, broken access control and other OWASP Top 10 categories, then blocking or flagging matches before they reach the back end application.

What is the difference between blocklist and allowlist security models in WAFs?

A blocklist (negative model) allows most traffic by default and only blocks known-bad patterns. An allowlist (positive model) blocks most traffic by default and then permits only recognized, legitimate patterns.

Can a WAF help prevent DDoS attacks?

No, if a real DDoS attack hits your WAF then it’s already too late. A WAF protects against application-layer attacks that exploit vulnerabilities in request handling. DDoS mitigation requires separate tools designed to absorb or filter high-volume traffic floods, ideally at the ISP or CDN level as these entities should have sufficient bandwidth to mount a meaningful defense.


Kurt Jung Headshot

Kurt Jung

Kurt Jung is a Senior Technical Marketing Engineer at Kemp Technologies. He works hands on with many technologies around application delivery and how to position these in today’s market. Kurt also works closely with key alliance partners to further strengthen the synergy. Prior to Kemp, Kurt has spent most of his career working as a consultant helping customers deploy on-premises, cloud and hybrid cloud solutions to support their business.

more from the author

Related tags

Start Powering Your Always-on Application Experience Today

Empower your apps to improve operational efficiencies and streamline complex decision processes with automated machine learning and business rules.

Free Trial
Start Powering Your Always-on Application Experience Today
Free Trial