What is a WAF (Web Application Firewall)?
⚡
Quick Answer
A WAF filters and monitors HTTP traffic to and from a web app, blocking common attacks like SQL injection, XSS, and malicious bots based on rules — operating at layer 7, unlike a network firewall.
Detailed Answer
WAFs (AWS WAF, Cloudflare, ModSecurity) use managed rule sets (e.g., OWASP CRS) plus custom rules and rate limiting to stop application-layer attacks and virtually patch known vulnerabilities. They are a mitigation layer, not a substitute for secure code, and need tuning to avoid blocking legitimate traffic.
💡
Interview Tip
Clarify it works at layer 7 (app layer) and is a mitigation, not a replacement for secure coding.
wafsecurityappsec