Install on FreeBSD
New to CrowdSec? Start with the introduction to understand the components and prerequisites.
Configure repositories
FreeBSD packages are available in the official repositories.
By default, pkg install uses quarterly releases (January, April, July, October), which include security fixes.
You can check /etc/pkg/FreeBSD.conf and change quarterly to latest if you feel comfortable upgrading your system.
Install the Security Engineโ
The CrowdSec package itself can be installed with:
sudo pkg install crowdsec
You'll see a message that tells you how to activate the service:
Enable Serviceโ
sudo sysrc crowdsec_enable="YES"
crowdsec_enable: -> YES
Start Serviceโ
sudo service crowdsec start
Fetching hub inventory
INFO[21-12-2021 03:13:35 PM] Wrote new 197364 bytes index to /usr/local/etc/crowdsec/hub/.index.json
[...]
Install a Remediation Componentโ
The Security Engine only detects. To block malicious traffic, install a Remediation Component.
For a quick start, we install the PF firewall Remediation Component. This may not fit every environment, so see the Remediation documentation for alternatives.
To install:
sudo pkg install crowdsec-firewall-bouncer
Before starting the firewall bouncer in pf mode, ensure your /etc/pf.conf defines the CrowdSec tables and blocking rules. See the Firewall Remediation Component pf setup guide.
Then you must enable it with the following commands:
Enable Serviceโ
sudo sysrc crowdsec_firewall_enable="YES"
crowdsec_firewall_enable: -> YES
Start Serviceโ
sudo service crowdsec_firewall start
Registered: cs-firewall-bouncer-ZjpcXlUx
Next stepsโ
Great, you now have CrowdSec installed. Continue with the post-installation steps to finish setup and optimize your deployment.