CrowdSec - CrowdSec bouncer written in golang for firewalls.
Follow these steps to get the add-on installed on your system:
- Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.
- Click on the icon at the top right then Respositories and add
https://github.com/crowdsecurity/home-assistant-addons
- Find the "CrowdSec Firewall Bouncer" add-on in CrowdSec add-ons repository and click it.
- Click on the "INSTALL" button.
!! This addon requires minimum Home Assistant OS version >= 8.0.
As a classic cs-firewall-bouncer, we need to generate a bouncer API key from CrowdSec, get the CrowdSec addon hostname and fill the addon configuration to communicate with CrowdSec.
To generate an bouncer API key, we need to access to the CrowdSec Terminal. Then type the command:
root@424ccef4-crowdsec:~# cscli bouncers add cs-firewall-bouncer
INFO[17-05-2022 03:23:36 PM] push and pull to Central API disabled
Api key for 'cs-firewall-bouncer':
a44bdb2ea50224f763015d04d2cd2e4b
Please keep this key since you will not be able to retrieve it!
The API Key and API URL need to be shared from the CrowdSec add-on to the Bouncer add-on. These details can be added through the Home Assistant UI Settings > Add-Ons > CrowdSec Firewall Bouncer > Configuration
, or by editing /config/.storage/crowdsec/config/local_api_configuration.yaml
directly.
The API URL should be input as: http://<crowdsec-terminal-hostname>:8080/
For the terminal output provided above, local_api_configuration.yaml
should appear as:
api_url: "http://424ccef4-crowdsec:8080/"
api_key: "a44bdb2ea50224f763015d04d2cd2e4b"
update_frequency: "10s"
log_level: info
Set local API url.
Set local API key.
Controls how often the bouncer is going to query the local API.
Controls the nftables hooks to use to configure multiple chains. Can be:
prerouting
input
(default)forward
output
postrouting
ingress
Controls logging level.
Got questions?
You have several options to get them answered:
- The Crowdsec Discord Chat Server.
- The Home Assistant Community Forum.
In case you've found a bug, please open an issue on our GitHub.