[Open Source] A Lightweight, Open-Source Web Application Firewall with Fully Self-Hosted Deployment and Data Encryption
![[Open Source] A Lightweight, Open-Source Web Application Firewall with Fully Self-Hosted Deployment and Data Encryption](https://yy123.ink/api/img/1782596624486-95l8de.jpg)
1. Project Overview

An Open-Source, Lightweight Web Application Firewall
SamWaf is an open-source, lightweight web application firewall that supports fully self-hosted deployment.
SamWaf is a free, lightweight web application firewall designed for small businesses, studios, and personal websites. It supports fully self-hosted deployment, encrypts data and stores it locally only, offers one-click startup, and supports Linux and 64-bit Windows.
2. Open Source License
Licensed under Apache-2.0
3. Screenshots
Interface

| Add Host | Attack Logs |
![]() |
|
| CC | IP Blacklist |
![]() |
![]() |
| IP Whitelist | LDP |
![]() |
![]() |
| Add Rule Script Logs | Select Log |
![]() |
![]() |
| Log Details | Manual Rules |
|
|
![]() |
| URL Blacklist | URL Whitelist |
![]() |
![]() |
4. Feature Overview
Development Motivation:
-
[Lightweight] In the early days, I used several products that provided protection through plugins built on Nginx, Apache, and IIS. However, plugin-based solutions were too tightly coupled.
-
[Self-Hosted Deployment] Most solutions now rely on cloud-based protection services. However, self-hosted deployment is generally affordable only for medium-sized and large enterprises. The costs are too high for ordinary small businesses and small development studios.
-
[Privacy and Encryption] During website protection, local data should not be uploaded to the cloud for processing. The goal is to encrypt sensitive local information and secure network communications with the management interface.
-
[DIY Customization] After years of website maintenance and development, I wanted to incorporate my own ideas into certain specific features, but existing solutions made this difficult to achieve.
-
[Visibility] Website administrators who have never used a similar WAF may find it inconvenient to inspect access information through their own logs or tools such as Nginx, Apache, and IIS. They cannot easily tell who is visiting their websites or what requests are being made. In short, this project aims to provide a practical tool for protecting websites and APIs, defending against abnormal activity, and ensuring the normal operation of websites and applications.
Main features:
-
Fully Open-Source Code
-
Supports Self-Hosted Deployment
-
Lightweight, with No Dependency on Third-Party Services
-
Completely Independent Engine; Protection Features Do Not Depend on IIS or Nginx
-
Custom Protection Rules with Support for Script-Based and GUI Editing
-
Whitelist-Based Access Control
-
IP Blacklist Support
-
URL Whitelist Support
-
URL Access Restrictions
-
Support for Configurable Privacy Output of Interface Data
-
CC Frequency-Based Access Protection
-
One-Click Global Configuration
-
Independent Protection Policies for Individual Websites
-
Encrypted Log Storage
-
Encrypted Communication Logs
-
Sensitive Information Masking and Storage
5. Tech Stack
Architecture

Quick Startup
Windows
-
Direct Startup
-
Run as a Service
Linux
-
Direct Startup
-
Run as a Service
Docker
Access After Startup
http://127.0.0.1:26666
Default Account: admin; Default Password: admin868 (Please change the default password upon your first login.)
More content, please refer to README.md document











