Crowdsec Nginx Bouncer

Crowdsec Nginx Bouncer

We have seen previously how to install Crowdsec on a Raspberry PI. Now we are going to see how to install the bouncer for Nginx. For this installation we use a container Debian 10 with Nginx 1.14.2.
We are beginning by Crowdsec installation.

Crowdsec installation

apt-get install bash gettext whiptail curl wget
curl -s | grep browser_download_url| cut -d '"' -f 4  | wget -i -
tar xvzf crowdsec-release.tgz
cd crowdsec-v*
sudo ./ -i

Bouncer Nginx Installation

tar xvzf cs-nginx-bouncer.tgz
cd cs-nginx-bouncer-*
sudo ./

The script install missing dependencies :

lua not found, do you want to install it (Y/n)?
lua5.3 successfully installed
lua-sec not found, do you want to install it (Y/n)?

We can test by add your public IP to the ban list (decisions).

cscli decisions add --ip VotreIpPublique

You must get the message :

Don’t forget to unban your IP 😉

cscli decisions delete --ip VotreIpPublique

Leave a Reply

Your email address will not be published. Required fields are marked *