alf149.crowdsec

Crowdsec

このAnsibleロールは、Crowdsecをインストールします。これには、ハブ、コレクション、シナリオ、ポストオーバーフロー、パーサー、バウンサー、およびPrometheusエンドポイントが含まれます。

要件

Ansibleマスターはバージョン2.12が必要です。

検証済みプラットフォーム:

  platforms:
    - name: Ubuntu
      versions:
        - bionic  #18.04 LTS
        - focal   #20.04 LTS
        - impish  #21.10
        - jammy   #22.04 LTS 未検証
    - name: Debian
      versions:
        - bookworm # 12
        - bullseye # 11
    - name: EL
      versions:
        - '8'   #Rocky & Alma LinuxおよびOracle Linux
        - '7'   #Oracle Linux

インストール方法

私はAnsible Galaxyを使ってrequirements.ymlを作成します。

roles:
  - geerlingguy.security
  - alf149.crowdsec

次に、以下を実行します。 ansible-galaxy install -r requirements.yml これにより、このロールがあなたのAnsibleプロジェクトにインポートされます。

ロール変数

デフォルト値を持つ利用可能な変数(defaults/main.ymlを参照)があります。 変数はgroup_vars/host.yml内でホスト特有に設定できます。

サンプルプレイブック

- hosts: all

  vars:
    cs_ban_duration: "duration: 4h" # PRODの場合、テストのために10mなど

  roles:
    - alf149.crowdsec 

手動タスクも便利です

ansible HOST -m shell -a "sudo cscli parsers install crowdsecurity/whitelists --force" ansible 'group' -m shell -a "sudo cscli parsers remove crowdsecurity/whitelists --force" ansible 'group' -m shell -a "sudo systemctl reload crowdsec"

TODO

  • Windowsサーバーでのテスト
  • もしかしたら、nftables/iptablesを自動検出して正しいバウンサーをロードする機能を実装する。

エラー報告

GitHubのイシューを使うか、プルリクエストを作成してください。

著者情報


Alf149

プロジェクトについて

This Ansibel roles installs Crowdsec incl. hub, collections, scenarios, postoverflows, parsers, bouncers and prometheus endpoint.

インストール
ansible-galaxy install alf149.crowdsec
ライセンス
mit
ダウンロード
4k
所有者