Install CrowdSec on pfSense

Step‑by‑Step Guide: Install CrowdSec on pfSense & Enroll in Console

1. Access pfSense via SSH or Console

2. Install CrowdSec Package

3. Configure CrowdSec via GUI

4. Verify Service Status

5. Viewing Alerts & Blocked IPs

6. Test the Setup

7. Optional: Whitelist Local Networks


Enroll Your pfSense Instance in CrowdSec Console

A. Setup Integration in the CrowdSec Console

  1. Log in to your [CrowdSec Console] account.
  2. Go to Blocklist → Integrations.
  3. Click Connect under pfSense.
  4. Provide a meaningful name (e.g., "My Firewall").
  5. Copy the credentials and integration ID — this will only display once(docs.crowdsec.net).

B. Configure pfSense to Fetch Blocklists

  1. In pfSense Web UI, go to Firewall → Aliases → URLs → Add.
  2. Create a new URL alias:

    • Name: crowdsec_blocklist (or similar)
    • Type: URL Table (IPs)
    • URL:

      https://<username>:<password>@admin.api.crowdsec.net/v1/integrations/<integration_id>/content
    • Set update frequency (e.g., daily)(docs.crowdsec.net).
  3. Save and Apply.

C. Create Firewall Rule to Block Malicious IPs

  1. Navigate to Firewall → Rules → WAN (or desired interface).
  2. Add a rule:

    • Action: Block
    • Interface: WAN
    • Source: use the alias created (crowdsec_blocklist)
    • Destination: Any
    • Description: e.g., “Block CrowdSec IPs”
  3. Save and apply changes(docs.crowdsec.net).

Summary Table of Steps

Step Action
1⃣ SSH into pfSense
2⃣ Install CrowdSec package (script or manual)
3⃣ Enable components in Services → CrowdSec
4⃣ Verify and manage services in GUI or shell
5⃣ Monitor alerts, decisions, and blocked IPs
6⃣ Test blocking with a temporary ban rule
7⃣ Optionally whitelist local networks
8⃣ Enroll instance in CrowdSec Console (Integrations)
9⃣ Set up URL alias to fetch CrowdSec blocklist
1️⃣0️⃣ Create firewall rule to block malicious IPs

Tips & Caveats


By following these steps, you'll achieve a well‑integrated CrowdSec deployment on pfSense — complete with automated blocking, visibility into attacks, and centralized management via the CrowdSec Console.

Ins0mniA


Revision #2
Created 2025-08-25 18:52:46 EEST by Green
Updated 2025-09-04 02:12:01 EEST by Green