[PR #1875] [CLOSED] Added crowdsec openresty bouncer support #3501

Closed
opened 2026-02-26 08:30:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/1875
Author: @LePresidente
Created: 2/21/2022
Status: Closed

Base: developHead: develop


📄 Description

This adds support for Nginx Proxy Manager to be a firewall bouncer for Crowdsec

Blog post on what this does
https://crowdsec.net/blog/nginx-bouncer-v1/

This has been expanded to be a permanent addon to Nginx Proxy Manager,
This requires the following changes to the base image
https://github.com/NginxProxyManager/docker-nginx-full/pull/7

There are three Configurations that would be needed to be configurable from Nginx Proxy Manager to configure the crowdsec-openresty-bouncer for the bare minimum to get it working

File: /data/crowdsec/crowdsec-openresty-bouncer.conf

#Enables/Disables the Proxy (true|false)
ENABLED=false
#URL to the crowdsec api
API_URL=
#APIKEY to the crowdsec api, generated on crowdsec using `cscli bouncers add NPM`
API_KEY=

I'm not really sure how to do the frontend, if I can get some guidance I could do it as well

This is also currently a global setting so if an IP is banned it won't be able to connect to any host.

Full config for crowdsec

ENABLED=true
API_URL=http://localhost:8080
API_KEY=
CACHE_EXPIRATION=1
# bounce for all type of remediation that the bouncer can receive from the local API
BOUNCING_ON_TYPE=all
FALLBACK_REMEDIATION=ban
REQUEST_TIMEOUT=3000
UPDATE_FREQUENCY=10
# live or stream
MODE=stream
# exclude the bouncing on those location
EXCLUDE_LOCATION=
#those apply for "ban" action
# /!\ REDIRECT_LOCATION and RET_CODE can't be used together. REDIRECT_LOCATION take priority over RET_CODE
BAN_TEMPLATE_PATH=/data/crowdsec/templates/ban.html
REDIRECT_LOCATION=
RET_CODE=
#those apply for "captcha" action
# ReCaptcha Secret Key
SECRET_KEY=
# Recaptcha Site key
SITE_KEY=
CAPTCHA_TEMPLATE_PATH=/data/crowdsec/templates/captcha.html
CAPTCHA_EXPIRATION=3600


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/1875 **Author:** [@LePresidente](https://github.com/LePresidente) **Created:** 2/21/2022 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `develop` --- ### 📄 Description This adds support for Nginx Proxy Manager to be a firewall bouncer for [Crowdsec](https://www.crowdsec.net) Blog post on what this does https://crowdsec.net/blog/nginx-bouncer-v1/ This has been expanded to be a permanent addon to Nginx Proxy Manager, This requires the following changes to the base image https://github.com/NginxProxyManager/docker-nginx-full/pull/7 There are three Configurations that would be needed to be configurable from Nginx Proxy Manager to configure the crowdsec-openresty-bouncer for the bare minimum to get it working File: /data/crowdsec/crowdsec-openresty-bouncer.conf ``` #Enables/Disables the Proxy (true|false) ENABLED=false #URL to the crowdsec api API_URL= #APIKEY to the crowdsec api, generated on crowdsec using `cscli bouncers add NPM` API_KEY= ``` I'm not really sure how to do the frontend, if I can get some guidance I could do it as well This is also currently a global setting so if an IP is banned it won't be able to connect to any host. Full config for crowdsec ``` ENABLED=true API_URL=http://localhost:8080 API_KEY= CACHE_EXPIRATION=1 # bounce for all type of remediation that the bouncer can receive from the local API BOUNCING_ON_TYPE=all FALLBACK_REMEDIATION=ban REQUEST_TIMEOUT=3000 UPDATE_FREQUENCY=10 # live or stream MODE=stream # exclude the bouncing on those location EXCLUDE_LOCATION= #those apply for "ban" action # /!\ REDIRECT_LOCATION and RET_CODE can't be used together. REDIRECT_LOCATION take priority over RET_CODE BAN_TEMPLATE_PATH=/data/crowdsec/templates/ban.html REDIRECT_LOCATION= RET_CODE= #those apply for "captcha" action # ReCaptcha Secret Key SECRET_KEY= # Recaptcha Site key SITE_KEY= CAPTCHA_TEMPLATE_PATH=/data/crowdsec/templates/captcha.html CAPTCHA_EXPIRATION=3600 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 08:30:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3501
No description provided.