bunkerweb README

The project's README from github.com/bunkerity/bunkerweb. As one markdown file: README.md.

BunkerWeb logo




GitRated rating Plumber CI/CD security score
Star History Rank

🌐 Website | 🤝 Panel | 📓 Documentation | 👨‍💻 Demo | 📱 Demo UI | 🧩 Templates | 🛡️ Examples
💬 Chat | 📝 Forum | 📝 Community | 🗺️ Threatmap | 📊 Status | 🔎 Feedback

🛡️ Make security by default great again!

BunkerWeb

Overview banner

BunkerWeb is a next-generation, open-source Web Application Firewall (WAF).

Being a full-featured web server (based on NGINX under the hood), it will protect your web services to make them "secure by default." BunkerWeb integrates seamlessly into your existing environments (Linux, Docker, Swarm, Kubernetes, …) as a reverse proxy and is fully configurable (don't panic, there is an awesome web UI if you don't like the CLI) to meet your own use cases. In other words, cybersecurity is no longer a hassle.

BunkerWeb contains primary security features as part of the core but can be easily extended with additional ones thanks to a plugin system.

Why BunkerWeb?

https://github.com/user-attachments/assets/c3fed740-28d8-4335-ab05-113a9e815b4f

Security features

A non-exhaustive list of security features:

Learn more about the core security features in the security tuning section of the documentation.

Demo

https://github.com/user-attachments/assets/6fc0e3c1-d353-4a84-bad0-15bf9b6623a5

A demo website protected with BunkerWeb is available at demo.bunkerweb.io. Feel free to visit it and perform some security tests.

Web UI

https://github.com/user-attachments/assets/a3ed56f8-c124-4ca9-b8b3-4be0913b3078

BunkerWeb offers an optional user interface to manage your instances and their configurations. An online read-only demo is available at demo-ui.bunkerweb.io, feel free to test it yourself.

BunkerWeb Cloud

Don't want to self-host and manage your own BunkerWeb instance(s)? You might be interested in BunkerWeb Cloud, our fully managed SaaS offering for BunkerWeb.

Order your BunkerWeb Cloud instance and get access to:

If you are interested in the BunkerWeb Cloud offering, don't hesitate to contact us so we can discuss your needs.

PRO version

Want to quickly test BunkerWeb PRO for one month? Use the code freetrial when placing your order on the BunkerWeb panel or by clicking here to directly to apply the promo code (will be effective at checkout).

When using BunkerWeb, you have the choice of the version you want to use: open-source or PRO.

Whether it's enhanced security, an enriched user experience, or technical monitoring, the BunkerWeb PRO version allows you to fully benefit from BunkerWeb and meet your professional needs.

In the documentation or the user interface, PRO features are annotated with a crown crown pro icon to distinguish them from those integrated into the open-source version.

You can upgrade from the open-source version to the PRO one easily and at any time. The process is straightforward:

Do not hesitate to visit the BunkerWeb panel or contact us if you have any questions regarding the PRO version.

Professional services

Get the most out of BunkerWeb by getting professional services directly from the maintainers of the project. From technical support to tailored consulting and development, we are here to assist you in the security of your web services.

You will find more information by visiting the BunkerWeb Panel, our dedicated platform for professional services.

Don't hesitate to contact us if you have any questions; we will be more than happy to respond to your needs.

Ecosystem, community, and resources

Official websites, tools, and resources about BunkerWeb:

Community and social networks:

Concepts

Concepts banner

You will find more information about the key concepts of BunkerWeb in the documentation.

Integrations

The first concept is the integration of BunkerWeb into the target environment. We prefer to use the word "integration" instead of "installation" because one of the goals of BunkerWeb is to integrate seamlessly into existing environments.

The following integrations are officially supported:

Settings

Once BunkerWeb is integrated into your environment, you will need to configure it to serve and protect your web applications.

The configuration of BunkerWeb is done by using what we call the "settings" or "variables." Each setting is identified by a name such as AUTO_LETS_ENCRYPT or USE_ANTIBOT. You can assign values to the settings to configure BunkerWeb.

Here is a dummy example of a BunkerWeb configuration:

SERVER_NAME=www.example.com
AUTO_LETS_ENCRYPT=yes
USE_ANTIBOT=captcha
REFERRER_POLICY=no-referrer
USE_MODSECURITY=no
USE_GZIP=yes
USE_BROTLI=no

Multisite mode

The multisite mode is a crucial concept to understand when using BunkerWeb. Because the goal is to protect web applications, we intrinsically inherit the concept of "virtual host" or "vhost" (more info here) which makes it possible to serve multiple web applications from a single (or a cluster of) instance.

By default, the multisite mode of BunkerWeb is disabled, which means that only one web application will be served and all the settings will be applied to it. The typical use case is when you have a single application to protect: you don't have to worry about the multisite, and the default behavior should be the right one for you.

When multisite mode is enabled, BunkerWeb will serve and protect multiple web applications. Each web application is identified by a unique server name and has its own set of settings. The typical use case is when you have multiple applications to protect and you want to use a single (or a cluster depending on the integration) instance of BunkerWeb.

Custom configurations

Because meeting all the use cases only using the settings is not an option (even with external plugins), you can use custom configurations to solve your specific challenges.

Under the hood, BunkerWeb uses the notorious NGINX web server, that's why you can leverage its configuration system for your specific needs. Custom NGINX configurations can be included in different contexts like HTTP or server (all servers and/or specific server block).

Another core component of BunkerWeb is the ModSecurity Web Application Firewall: you can also use custom configurations to fix some false positives or add custom rules, for example.

Database

Database model

The state of the current configuration of BunkerWeb is stored in a backend database which contains the following data:

The following backend databases are supported: SQLite, MariaDB, MySQL, and PostgreSQL.

Scheduler

To make things automagically work together, a dedicated service called the scheduler is in charge of:

In other words, the scheduler is the brain of BunkerWeb.

Setup

Linux

Linux banner

List of supported Linux distros:

You will find more information in the Linux section of the documentation.

Docker

Docker banner

We provide ready-to-use prebuilt images for x64, x86, armv7, and arm64 platforms on Docker Hub.

Docker integration key concepts are:

You will find more information in the Docker integration section of the documentation.

Docker autoconf

Docker autoconf banner

The downside of using environment variables is that the container needs to be recreated each time there is an update, which is not very convenient. To counter that issue, you can use another image called autoconf which will listen for Docker events and automatically reconfigure BunkerWeb in real-time without recreating the container.

Instead of defining environment variables for the BunkerWeb container, you simply add labels to your web applications containers and the autoconf will "automagically" take care of the rest.

You will find more information in the Docker autoconf section of the documentation.

Kubernetes

Kubernetes banner

The autoconf acts as an Ingress controller and will configure the BunkerWeb instances according to the [Ingress resources](https://kubernetes.i

bunkerweb (bunkerity/bunkerweb)

Searching Database…

11.1K ·GitHub
这是什么?BunkerWeb 是一款开源的新一代 Web 应用防火墙(WAF),基于 NGINX 构建,是一个功能完整的 Web 服务器。它以“默认安全”的方式保护你的 Web 应用和 API,同时可以作为反向代理接入你现有的环境。
这是我要导入的代码库,还是我要部署的独立服务器?它是一个独立的反向代理服务器(基于 NGINX 的 WAF),你需要把它部署在 Web 应用前面运行。它可以选配 Web 界面,并由一个调度服务负责管理配置,它不是代码库。
我该怎么把它跑起来?选择与你环境相匹配的集成方式:在受支持的 Linux 发行版上安装软件包,运行预构建的 Docker 镜像(需要搭配调度器容器),使用 Docker autoconf 镜像基于标签自动配置,或者部署到 Swarm、Kubernetes 或 Azure 上。
除了 BunkerWeb 本身,运行它还需要什么?你需要一个受支持的平台(特定版本的 Linux 发行版、Docker、Swarm 或 Kubernetes),以及一个用于存储配置状态的后端数据库;支持 SQLite、MariaDB、MySQL 和 PostgreSQL。
使用 Docker 镜像是不是每次修改配置都得重新创建容器?在普通的 Docker 集成方式下,是的——修改环境变量需要重新创建容器。单独的 “autoconf” 镜像则可以避免这一点,它通过监听 Docker 事件,并根据容器标签实时重新配置。
它是给个人站点主用的,还是可以同时保护多个站点?它支持“多站点”模式,一个 BunkerWeb 实例(或集群)可以同时服务并保护多个 Web 应用,每个应用都有自己的服务器名称和设置;默认情况下只保护一个应用。
它在哪里运行?裸机、容器还是编排平台?它可以运行在特定的 Linux 发行版上(Debian、Ubuntu、Fedora、RHEL/CentOS/Rocky/AlmaLinux),也可以以 Docker 容器形式运行(提供 x64、x86、armv7、arm64 镜像),还可以部署在 Docker Swarm、Kubernetes(通过 Ingress 控制器)以及 Microsoft Azure 上。
这东西是完全免费的,还是某些地方要收费?核心版本基于 AGPLv3 许可证免费使用;另外还有可选的付费 PRO 版本,提供额外功能,以及托管的 BunkerWeb Cloud SaaS 服务,附带专业支持。
开箱即用包含哪些安全功能?自动通过 Let's Encrypt 启用 HTTPS,提供 HTTP 安全响应头和 TLS 加固,集成的 ModSecurity WAF 并配有 OWASP 核心规则集,基于 HTTP 状态码的自动封禁,连接和请求速率限制,机器人拦截挑战(Cookie、JavaScript、验证码、hCaptcha、reCAPTCHA),以及通过 DNSBL 和黑名单拦截已知恶意 IP。
不用命令行,我能管理它吗?可以。BunkerWeb 提供了一个可选的 Web 界面,用于管理实例和配置,并且有一个可在线访问的只读公开演示。
除了内置设置,我还能如何自定义 BunkerWeb?除了具名的设置和变量外,你还可以在 HTTP 或 server 块级别注入自定义 NGINX 配置片段,编写自定义 ModSecurity 规则,并通过插件系统扩展功能。
是什么在背后保证配置和计划任务正常运行?一个专门的“调度器”服务把设置和自定义配置存储在后端数据库中,定期运行计划任务,生成 BunkerWeb 能够识别的最终配置,并作为 Web 界面和 autoconf 的中间层。
Creator
bunkerity
Size
1 GB
Stars
11.1K
Age
7y
Commits · 90 Days