Install CrowdSec (Linux)
For those that prefer hands-on approach, you can as well manually install crowdsec.
#
Install our repositoriesInstalling our repositories allows you to access the latest packages of crowdsec and bouncers.
info
We are using packagecloud.io service.
While curl | sudo bash
can be convenient for some, alternative installation methods are available.
- Debian/Ubuntu
- EL/Fedora/Centos7
- EL/Fedora/Centos8
- Amzn Linux 2
- Docker
- Kubernetes
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bash
helm repo add crowdsec https://crowdsecurity.github.io/helm-charts && helm repo update
#
Install crowdsec- Debian/Ubuntu
- EL/Fedora/Centos7
- EL/Fedora/Centos8
- Amzn Linux 2
- Docker
- Kubernetes
apt install crowdsec
yum install crowdsec
dnf install crowdsec
yum install crowdsec
dnf install crowdsec
docker pull crowdsecurity/crowdsec
helm install crowdsec crowdsec/crowdsec -f crowdsec-values.yaml -n crowdsec --create-namespace
You now have crowdsec running ! You can move forward and install a bouncer, or take a tour of the software beforehand !
caution
Keep in mind that the crowdsec package is only in charge of the "detection", and won't block anything on its own. You need to deploy a bouncer to "apply" decisions.
#
Install a bouncer- Debian/Ubuntu
- EL/Fedora/Centos7
- EL/Fedora/Centos8
- Amzn Linux 2
apt install crowdsec-firewall-bouncer-iptables
yum install crowdsec-firewall-bouncer-iptables
dnf install crowdsec-firewall-bouncer-iptables
yum install crowdsec-firewall-bouncer-iptables
pkg install crowdsec-firewall-bouncer-iptables
info
While we're suggesting the most common firewall bouncer, check our hub for more of them. Find a bouncer directly for your application (nginx, php, wordpress) or your providers (cloudflare, AWS/GCP/...)
#
Running crowdsec on raspberry pi os/raspbianPlease keep in mind that raspberry pi OS is designed to work on all raspberry pi versions. Even if the port target is known as armhf, it's not exactly the same target as the debian named armhf port.
The best way to have a crowdsec version for such an architecture is to do:
- install golang (all versions from 1.16 will do)
export GOARCH=arm
export CGO=1
- Update the GOARCH variable in the Makefile to
arm
- install the arm gcc cross compiler (On debian the package is gcc-arm-linux-gnueabihf)
- Compile crowdsec using the usual
make
command