All Projects → bunkerity → Bunkerized Nginx

bunkerity / Bunkerized Nginx

🛡️ Make your web services secure by default !

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language
lua
6591 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
CSS
56736 projects

Projects that are alternatives of or similar to Bunkerized Nginx

Dockerweb
A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.
Stars: ✭ 89 (-96.23%)
Mutual labels:  nginx, letsencrypt, hosting
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (-81.91%)
Mutual labels:  reverse-proxy, nginx, letsencrypt
lunasec
LunaSec - Dependency Security Scanner that automatically notifies you about vulnerabilities like Log4Shell or node-ipc in your Pull Requests and Builds. Protect yourself in 30 seconds with the LunaTrace GitHub App: https://github.com/marketplace/lunatrace-by-lunasec/
Stars: ✭ 1,261 (-46.59%)
Mutual labels:  cybersecurity, web-security, devsecops
Bbrecon
Python library and CLI for the Bug Bounty Recon API
Stars: ✭ 169 (-92.84%)
Mutual labels:  web-security, cybersecurity
Netcore Postgres Oauth Boiler
A basic .NET Core website boilerplate using PostgreSQL for storage, Adminer for db management, Let's Encrypt for SSL certificates and NGINX for routing.
Stars: ✭ 57 (-97.59%)
Mutual labels:  nginx, letsencrypt
Dockerfiles
lots of dockerfiles, based on alpine
Stars: ✭ 69 (-97.08%)
Mutual labels:  nginx, letsencrypt
Mobile Security Framework Mobsf
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
Stars: ✭ 10,212 (+332.53%)
Mutual labels:  web-security, devsecops
Content
Security automation content in SCAP, OSCAL, Bash, Ansible, and other formats
Stars: ✭ 1,219 (-48.37%)
Mutual labels:  hardening, cybersecurity
Awesome Nodejs Security
Awesome Node.js Security resources
Stars: ✭ 1,294 (-45.19%)
Mutual labels:  web-security, cybersecurity
Serverpilot Letsencrypt
Automate the installation of Let's Encrypt SSL on the free plan of ServerPilot
Stars: ✭ 129 (-94.54%)
Mutual labels:  nginx, letsencrypt
Docker Nginx Gunicorn Flask Letsencrypt
Boilerplate code for setting up Nginx + Gunicorn + Flask + automated LetsEncrypt certificates (https) using docker-compose.
Stars: ✭ 117 (-95.04%)
Mutual labels:  nginx, letsencrypt
Jiff
JavaScript library for building web-based applications that employ secure multi-party computation (MPC).
Stars: ✭ 131 (-94.45%)
Mutual labels:  web-security, cybersecurity
Vpstoolbox
一键安装Trojan-GFW代理,Hexo博客,Nextcloud等應用程式。
Stars: ✭ 1,080 (-54.26%)
Mutual labels:  nginx, letsencrypt
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (-97.76%)
Mutual labels:  reverse-proxy, nginx
Nginx Baseline
DevSec Nginx Baseline - InSpec Profile
Stars: ✭ 71 (-96.99%)
Mutual labels:  hardening, nginx
Docker Swarm Cookbook
A large collection of recipes for a complete, self-hosted Docker Swarm stack including Traefik v2 and SSO/Auth
Stars: ✭ 49 (-97.92%)
Mutual labels:  reverse-proxy, swarm
Docker Nginx Letsencrypt Upstream
infrastructure: docker-compose config for node and redis behind upstream nginx ( SSL/HTTPS ) on debian jessie
Stars: ✭ 47 (-98.01%)
Mutual labels:  nginx, letsencrypt
Nginxconfig.io
⚙️ NGINX config generator on steroids 💉
Stars: ✭ 14,983 (+534.6%)
Mutual labels:  nginx, letsencrypt
Traefik
The Cloud Native Application Proxy
Stars: ✭ 36,089 (+1428.55%)
Mutual labels:  reverse-proxy, letsencrypt
Droxy
a transparent standalone http reverse proxy for docker containers
Stars: ✭ 43 (-98.18%)
Mutual labels:  reverse-proxy, nginx

Documentation | Examples | Blog posts | Community chat | Follow us

Make security by default great again !

bunkerized-nginx is a web server based on the notorious nginx and focused on security. It integrates into existing environments (Linux, Docker, Swarm, Kubernetes, ...) to make your web services "secure by default" without any hassle. The security best practices are automatically applied for you while keeping control of every settings to meet your own use case.

Non-exhaustive list of features :

  • HTTPS support with transparent Let's Encrypt automation
  • State-of-the-art web security : HTTP security headers, prevent leaks, TLS hardening, ...
  • Integrated ModSecurity WAF with the OWASP Core Rule Set
  • Automatic ban of strange behaviors
  • Antibot challenge through cookie, javascript, captcha or recaptcha v3
  • Block TOR, proxies, bad user-agents, countries, ...
  • Block known bad IP with DNSBL and distributed blacklist
  • Prevent bruteforce attacks and protect API resources with rate limiting
  • Plugins system for external security checks (ClamAV, CrowdSec, ...)
  • Easy to configure with environment variables or web UI
  • Seamless integration into existing environments : Linux, Docker, Swarm, Kubernetes, ...

Fooling automated tools/scanners :

You can find a live demo at https://demo-nginx.bunkerity.com, feel free to do some security tests.

Table of contents

Click to show

Integrations

Docker

You can get official prebuilt Docker images of bunkerized-nginx for x86, x64, armv7 and aarch64/arm64 architectures on Docker Hub :

$ docker pull bunkerity/bunkerized-nginx

Or you can build it from source if you wish :

$ git clone https://github.com/bunkerity/bunkerized-nginx.git
$ cd bunkerized-nginx
$ docker build -t bunkerized-nginx .

To use bunkerized-nginx as a Docker container you have to pass specific environment variables, mount volumes and redirect ports to make it accessible from the outside.

You will find more information about Docker integration in the documentation.

Docker autoconf

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 bunkerized-nginx-autoconf which will listen for Docker events and automatically configure bunkerized-nginx instance in real time without recreating the container. Instead of defining environment variables for the bunkerized-nginx container, you simply add labels to your web services and bunkerized-nginx-autoconf will "automagically" take care of the rest.

You will find more information about Docker autoconf feature in the documentation.

Swarm

The deployment and configuration is very similar to the "Docker autoconf" one but with services instead of containers. A service based on the bunkerized-nginx-autoconf image needs to be scheduled on a manager node (don't worry it doesn't expose any network port for obvious security reasons). This service will listen for Docker Swarm events like service creation or deletion and generate the configuration according to the labels of each service. Once configuration generation is done, the bunkerized-nginx-autoconf service will send the configuration files and a reload order to all the bunkerized-nginx tasks so they can apply the new configuration. If you need to deliver static files (e.g., html, images, css, js, ...) a shared folder accessible from all bunkerized-nginx instances is needed (you can use a storage system like NFS, GlusterFS, CephFS on the host or a Docker volume plugin).

You will find more information about Docker Swarm integration in the documentation.

Kubernetes

This integration is still in beta, please fill an issue if you find a bug or have an idea on how to improve it.

The bunkerized-nginx-autoconf acts as an Ingress Controller and connects to the k8s API to get cluster events and generate a new configuration when it's needed. Once the configuration is generated, the Ingress Controller sends the configuration files and a reload order to the bunkerized-nginx instances running in the cluster. If you need to deliver static files (e.g., html, images, css, js, ...) a shared folder accessible from all bunkerized-nginx instances is needed (you can use a storage system like NFS, GlusterFS, CephFS on the host or a Kubernetes Volume that supports ReadOnlyMany access).

You will find more information about Kubernetes integration in the documentation.

Linux

This integration is still in beta, please fill an issue if you find a bug or have an idea on how to improve it.

List of supported Linux distributions :

  • Debian buster (10)
  • Ubuntu focal (20.04)
  • CentOS 7
  • Fedora 34
  • Arch Linux

Unlike containers, Linux integration can be tedious because bunkerized-nginx has a bunch of dependencies that need to be installed before we can use it. Fortunately, we provide a helper script to make the process easier and automatic. Once installed, the configuration is really simple, all you have to do is to edit the /opt/bunkerized-nginx/variables.env configuration file and run the bunkerized-nginx command to apply it.

You will find more information about Linux integration in the documentation.

Configuration

The configuration is made through what we call "environment variables" as a form of key/value pairs. You will find the quickstart guide and the complete list of environment variables in the documentation.

Singlesite

By default, bunkerized-nginx will only create one server block in the nginx configuration. This cover the simplest use-case where you want to protect one service easily and quickly.

Here is a dummy configuration as an example :

SERVER_NAME=example.com www.example.com
AUTO_LETS_ENCRYPT=yes
DISABLE_DEFAULT_SERVER=yes
USE_REVERSE_PROXY=yes
REVERSE_PROXY_URL=/
REVERSE_PROXY_HOST=http://internal-service.example.local:8080
# Uncomment the HTTP_PORT and HTTPS_PORTS variables when using Linux configuration
#HTTP_PORT=80
#HTTPS_PORT=443

Multisite

If you have multiple services to protect, the easiest way to do it is by enabling the "multisite" mode. When using multisite, bunkerized-nginx will create one server block per server defined in the SERVER_NAME environment variable. You can configure each servers independently by adding the server name as a prefix.

Here is a dummy configuration as an example :

SERVER_NAME=app1.example.com app2.example.com
# Without prefix the variables are applied globally but can still be overriden
AUTO_LETS_ENCRYPT=yes
DISABLE_DEFAULT_SERVER=yes
# Specific configurations for first service
app1.example.com_USE_REVERSE_PROXY=yes
app1.example.com_REVERSE_PROXY_URL=/
app1.example.com_REVERSE_PROXY_HOST=http://internal-service.example.local:8080
# Specific configuration for second service
app2.example.com_REMOTE_PHP=my-fpm
app2.example.com_REMOTE_PHP_PATH=/var/www/html
# Uncomment the HTTP_PORT and HTTPS_PORTS variables when using Linux configuration
#HTTP_PORT=80
#HTTPS_PORT=443

Special folders

Name Location Purpose Multisite
www /www (container)
/opt/bunkerized-nginx/www (Linux)
Static files that need to be delivered by bunkerized-nginx. Yes
http-confs /http-confs (container)
/opt/bunkerized-nginx/http-confs (Linux)
Custom nginx configuration files loaded at http context. No
server-confs /server-confs (container)
/opt/bunkerized-nginx/server-confs (Linux)
Custom nginx configuration files loaded at server context. Yes
modsec-confs /modsec-confs (container)
/opt/bunkerized-nginx/modsec-confs (Linux)
Custom ModSecurity configuration files loaded before the Core Rule Set. Yes
modsec-crs-confs /modsec-crs-confs (container)
/opt/bunkerized-nginx/modsec-crs-confs (Linux)
Custom ModSecurity configuration files loaded after the Core Rule Set. Yes
plugins /plugins (container)
/opt/bunkerized-nginx/plugins (Linux)
Location of bunkerized-nginx plugins. No
cache /cache (container)
/opt/bunkerized-nginx/plugins (Linux)
Placeholder for caching data like external blacklists. No
acme-challenge /acme-challenge (container)
/opt/bunkerized-nginx/acme-challenge (Linux)
Placeholder for Let's Encrypt challenges. No

You will find more information about the special folders in the documentation.

Web UI

You will find more information about the web UI in the documentation.

Security tuning

bunkerized-nginx comes with a set of predefined security settings that you can (and you should) tune to meet your own use case. We recommend you to read the security tuning section of the documentation.

Going further

License

This project is licensed under the terms of the GNU Affero General Public License (AGPL) version 3.

Contributing

If you would like to contribute to the project you can read the contributing guidelines to get started.

Security policy

We take security bugs as serious issues and encourage responsible disclosure, see our security policy for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].