percentile = смига, perlèche, 08007613362, togther, thimbtack, garantenpflicht, 03450504585, пуанты, 250052, netflixlogin, embrión, سيفازولين, karateca, plostica, junkjard, kartridże, bosleys, яблонська, ulgel, tarapoto, ambidextru, kabelklem, indiansexatories, mauling, nasyonalismo, rabbithole, джомолунгма, κουτσογιαννοπουλοσ, irredescent, körfűrész, proflo, aneurismas, icity, 4322463000, resoconto, 221473652, усисивач, artelier, прокопенко, borrelpakket, trehaus, čelik, beheeyem, 3059035, 05023002898, 3232393, 8594558650, 4721172, 9188773024, бандеролі, 3886957240, letterings, checkbook, 8778171332, repülés, lecomte, gallos, besucherstuhl, приорітет, sogbet, transenne, 0342327622, vibrant, rangendingen, 05031074371, medialcare, 05031207863, 4073173800, exampt, schwalbennestersuppe, 0800801130, 6163914116, naschel, karolak, 0120420119, 6788062977, inkenntnissetzung, 9733483845, 0677774468, ändern, stagebehind, 4078969411, 08020590830, 4014446877, zimbrul, тонзиліт, mangleren, attheraves, 0120901268, grosshandlaren, esight, ренген, lapanen, 2816118, xphim, 4005900786470, sildegra, фломма, höllenstein, dexcophan, свинарчук, ensiler, cosmin, бурунди, eraflu, yourgirlaya, yuhaaviatam, sexmodellille, convivent, hashkey, blogmobi, znamie, unistoffe, forlimpopoli, edino, rubost, mobilparkolás, вогник, iberobus, 8004400680, 7134425200, medexaflam, пресловљавање, preskriptionslagen, pemanis, 224270, хамсия, holzkit, daponte, steag, camaroon, йордечка, bliese, الوهم, 8669360316, порномилф, 336732, playgam, виниры, fusionspan, keepra, subwofer, huskur, firestore, vendégmatrac, sorgeti, 6016651018, organiseringslådor, 0120501691, ростик, quinchos, brico, μερντοχ, tftstats, hibiscus, stoneisland, herbsturlaub, fruchtbar, plantagenets, beelink, ітака, фанта, schellevis, maintnance, 0892393910, tbaytel, reggeliző, 89347777, 9165256100, 4536591, prefixumok, 5183041094, houževnatost, amplituhedron, 07026561275, yogamana, kneesocks, 2199474151, eurocartour, boags, seedgo, saratosa, devolucion, maxoffer, линкед, magmin, bufon, saccharomyces, العوسج, antona, lightdash, 3285743046, ingpro, الامبراطوريه, turfopronos, comcipe, comcare, kåvepenin, pingla, 05030000531, 0800800987, 721356, 2118008000, traistariu, blomsterslottet, brisach, 6787373546, 0120221358, initialbewerbung, 0927915515, 05054974414, 30500001735, wowowin, álmodozók, croydonistas, thqnordic, exogenos, twideo, 08007775900, сонгстер, lullemon, granuli, kalotaszeg, amatist, mendukung, supersonique, wiezen, bredbandsvalen, 0367001310, mastocytos, tupaia, wellext, pulptoon, laserlegene, nápoj, spiehel, gázfőző, aetie, yeasayer, rullebör, amazón, euromatpol, pteranodonte, ujizz, 8054133032, bryllupskort, картпак, activación, брусилов, idoja, paralinguistica, detonacion, 3510514341, gizdodo, 3204135066, 0266060103, skysoorts, 05031100312, elepha, frasyniuk, underarmour, русич, rugbox, 8335026678, αγιοι, леверда, 3332628692, spirytus, alzental, glömsta, 86798574, gnetwork, 05034908958, 08016006319, neetwork, 08003311202, профлист, einlegegurken, koalitionskriege, nezaker, 4025269, zotogrande, superwholock, elekt, uverse, maatbekers, synspective, schuheinlage, 07026558873, 3666155970, akustikstoff, winber, леопольд, 3533369025, surdulica, auchentoshan, 0669206390, enigaseluce, fibragglo, insensé, bossjobs, atruvia, mokulele, astounding, lapus, prodirect, 08014145072, токен, rusky, pomogács, orgullosa, čajník, 8336852203, bonacure, 0701342, procureship, kampókéz, deshow, seidopro, буклет, inochi, supervisora, tipicos, tumatsa, bagaybay, hairnet, ukininam, warxtreme, perzeption, bacitracina, pylobiotic, thuổng, thothib, 4722195, bukle, 07013429487, cetol, مساحة, brooki, stackdown, 231381116, batterisyre, jaguares, cronenburg, habitacom, takvifte, melodifestival, achsvermessung, тимощук, negating, britsh, 4845406, πτελεοσ, arborescence, horbach, kismegszakító, bezár, миравис, اسينات, musicnotes, cundigital, 0570064293, speedoru, roguelike, zaubersand, святвечір, 3791862317, propaem, mediterrean, odzadu, worksheetfun, svetstråd, pöllath, tenichi, apuacom, masturbateurs, sonnenblumenfeld, anisozytose, نفرتيتى, hungarospa, 000660, 0120012380, vanguardia, トライアル, äädikas, 8887657111, cordoncillo, cuñas, cosim, teksturspray, meghanmarkle, поговорки, marakes, nefropata, hasselnöt, recesszió, breckenhill, винлайн, hiritu, viraali, uplink, alströmer, 4797631, pavini, icegay, 0669104115, ilustracion, neobanco, 08012588377, retek, tiesas, fondle, 3238375743, 0120354262, femeyra, washbrooks, 05030858456, 8005000, 4691074, 0355392242, 044135021610, 05055368602, 3122601126, лизиантус, нервістіл, 06309303100, shipday, 0120983800, flipple, 19363567, hausberg, полюлей, seniores, бревно, primeflight, решетилівка, squidball, زرادشت, hofor, firsttrade, steckerlbrot, ръченица, 5127174110, sepillo, cindies, marmottan, feiert, gravedad, феофания, holzstühle, мотофреза, bansot, șofer, malfattis, buloane, haromszek, minlaw, muselin, faucheuse, 0120994451, piestany, дрозофіли

Web Application Firewall (WAF): What It Blocks and How It Works

Worried that attackers will probe your site’s forms and logins? A web application firewall sits in front of your site, reads each HTTP request, and blocks attacks such as SQL injection before they reach your code. It helps, but it does not replace patching. This guide is one part of our wider coverage of website…

web application firewall

Worried that attackers will probe your site’s forms and logins? A web application firewall sits in front of your site, reads each HTTP request, and blocks attacks such as SQL injection before they reach your code. It helps, but it does not replace patching.

This guide is one part of our wider coverage of website security.

Item Value
ModSecurity open-source WAF engine, in protection use since 2002
Release the CRS install guide recommends for production v4.25.0
Rule ID that switches off CRS response rules 900500
First CRS version with that switch 4.10.0
CRS licence Apache License 2.0

These figures come from the OWASP WAF Projects page and the CRS documentation. They can change, so check the source before you rely on them.

What a web application firewall does

A WAF is a specific form of application firewall that filters, monitors, and blocks HTTP traffic to and from a web service, as Wikipedia’s overview puts it. It is deployed in front of web applications and analyzes web traffic in both directions, detecting and blocking anything malicious.

Red Hat’s primer for Linux sysadmins describes the job simply: inspect all HTTP traffic bound for a web server, discard the bad requests, and pass the good ones on. The same primer notes that the first device built and named as a firewall came from DEC in the 1980s.

Dedicated WAF tooling is younger than that. The open-source engine ModSecurity has been protecting web applications since 2002, according to the OWASP WAF Projects page.

What does a WAF block?

By inspecting HTTP traffic, a WAF can prevent attacks that exploit a web application’s known weaknesses. Wikipedia lists these examples:

  • SQL injection
  • Cross-site scripting (XSS)
  • File inclusion
  • Improper system configuration

Rule sets aim wider than that list. Red Hat says the Core Rule Set includes signatures for all of the OWASP Top Ten web application security risks, plus a wide variety of other attacks (Red Hat).

A WAF also buys you time. When a flaw is found in your code and a fix will take a while, a custom policy can act as a virtual patch, a temporary but immediate fix, per Wikipedia.

How a WAF decides what to block

Early WAF products work much like antivirus software: you give them a list of what to block. Red Hat calls this signature-based detection. A simple signature looks for telltale fragments of an attack inside a GET or POST request and drops the request on a match (Red Hat).

The catch is upkeep. Signatures work well but need a lot of maintenance so that false positives stay low, and writing them means matching an attack pattern without catching legitimate traffic.

Wikipedia adds that WAFs typically follow a positive security model, a negative one, or a mix, as the SANS Institute describes (Wikipedia). In plain terms, a negative model blocks known-bad patterns, while a positive model allows only known-good ones.

An orange padlock bearing a blue shield hangs from metal wire fencing.

Where the WAF sits: deployment options

WAFs are deployed inline in three ways, according to NSS Labs as summarized by Wikipedia:

  1. Transparent bridge: the WAF sits in the traffic path without the client or server noticing.
  2. Transparent reverse proxy: traffic goes straight to the web application, so the WAF stays invisible between client and server.
  3. Reverse proxy: the client’s traffic goes to the WAF, which then separately sends filtered traffic on to the web application.

The reverse proxy mode can give extra benefits such as IP masking. It may also add performance latency, so test response times after switching it on (Wikipedia).

Open-source engines and rule sets

If you run your own server, you can build a WAF from free parts. The OWASP WAF Projects page lists ModSecurity as the original open-source engine and Coraza as a next-generation engine built from the ground up in Go for cloud-native environments.

Both engines need rules, and the usual choice is OWASP CRS. The CRS documentation describes it as a free, open-source collection of rules that work with ModSecurity and compatible WAFs, designed to give generic attack detection with a minimum of false positives.

Plan to tune it anyway. Red Hat warns that anyone deploying the CRS will inevitably need to tweak the rules, which takes some grasp of the rule language and of HTTP (Red Hat).

One default deserves a test before launch. The CRS install guide says response rules are on by default, and that an attacker who can get input echoed back in a response might make the WAF block that response for all clients. Since CRS 4.10.0 you can disable them by uncommenting rule ID 900500 in the setup file.

When comparing products, OWASP’s WAFEC project offers a vendor-neutral framework for evaluating, testing, and comparing WAF capabilities, though the same page admits it has not been updated in many years.

Where a WAF fits in your wider defenses

A WAF is not a complete answer. Wikipedia says WAFs are meant to work alongside network firewalls and intrusion prevention systems as part of a holistic defense (Wikipedia).

Before you choose one, check these points:

  • Whether it covers the OWASP Top Ten risks at a minimum.
  • How you will tune it and who watches the false positives.
  • Whether your hosting setup lets you run it in front of the site.
  • How you will test it after each rule change.

If your site runs on WordPress, our wordpress security guide covers the platform-specific side. For attacks meant to knock a site over rather than break into it, see our guide to ddos protection.

Frequently asked questions

Does a WAF replace fixing vulnerable code?

Show answer

No. It filters requests and can cover a gap for a while, but the flaw stays in the application until you correct it.

Can a WAF block real visitors by mistake?

Show answer

Yes. Rules that are too broad can flag normal requests as attacks, which is why rule sets need tuning and monitoring after you turn them on.

Is there a free WAF I can try?

Show answer

Open-source options exist. ModSecurity and Coraza are free engines, and OWASP CRS supplies free rules for them, as listed by OWASP.

Does a WAF only protect websites I host myself?

Show answer

A WAF can be a software or hardware appliance, or part of other network components, per the PCI DSS definition quoted on Wikipedia. What matters is that it sits between the web application and the client.

Website Security

  • Website Malware Removal: Clean a Hacked Site Step by Step

    Website Malware Removal: Clean a Hacked Site Step by Step

    Spotted spam links, strange redirects or a browser warning on your site? Website malware removal comes down to restoring a clean backup or replacing infected files, then closing the hole the attacker used. This guide sits inside our wider coverage of website security, which also looks at prevention. These figures and steps come from web.dev’s…

  • Website Backups: How to Set Them Up and Restore Them

    Website Backups: How to Set Them Up and Restore Them

    Worried a bad update or hack could wipe your site? A solid website backup follows the 3-2-1 rule: three copies, two storage types, one off-site, tested regularly. This guide is part of our wider look at website security, where backups are one layer of protection. Figures come from Duplicator’s 3-2-1 guide and the U.S. Chamber…

  • Website Security Basics: How to Protect Your Site

    Website Security Basics: How to Protect Your Site

    Worried your site could get hacked? Website security comes down to a few habits you can start today: protect accounts with MFA, force HTTPS, patch fast, back up often and harden your server. These figures come from CISA’s archived February 2021 guidance and UpGuard’s website security checklist. They can change, so check the sources before…