lua-resty-waf is a web application firewall implemented in Lua for OpenResty/NGINX, designed to run inline at the edge with low overhead. It inspects requests and responses during NGINX phases, applying rule logic and anomaly scoring to detect patterns like SQL injection, cross-site scripting, and protocol abuse. Rules are organized into policies with configurable actions—block, log, or allow—and can leverage shared dictionaries for counters, rate limits, and caching decisions. Because it runs inside the NGINX event loop, it scales with the web tier and avoids the latency of external proxies. Operators can extend it with custom Lua code, integrate threat feeds, or adapt it to application-specific quirks without recompiling modules. The result is a flexible, scriptable WAF that pairs the performance of NGINX with the expressiveness of Lua for nuanced HTTP defense.

Features

  • Built on OpenResty allowing Nginx-level request inspection via Lua API
  • Uses ModSecurity-compatible rule syntax for widespread CRS rule sharing
  • Includes custom rules and a virtual patching mechanism for zero-day threats
  • Blocks brute-force attacks, malicious bots, and automated scraping attempts
  • Can integrate real-time DNS blacklists to deny known malicious hosts
  • Supports remote logging via TCP, UDP, or syslog for audit and analytics

Project Samples

Project Activity

See All Activity >

Categories

Firewall

License

GNU General Public License version 3.0 (GPLv3)

Follow lua-resty-waf

lua-resty-waf Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of lua-resty-waf!

Additional Project Details

Operating Systems

Linux

Programming Language

Perl

Related Categories

Perl Firewall Software

Registered

2025-09-10