Skip to main content

OPNsense

OPNsense Integration CardOPNsense Integration Card

The CrowdSec OPNsense integration connects CrowdSec's hosted blocklist endpoint to your OPNsense firewall. In OPNsense, you'll use URL Table (IPs) aliases to create dynamic firewall aliases that automatically update from external URL sources.

Ensure your OPNsense version supports URL Table (IPs) aliases. If unsure, refer to the OPNsense documentation or contact OPNsense support.

Create an OPNsense Integration Endpoint

Step 1 — Create an integration in the CrowdSec Console

In your CrowdSec Console account, navigate to the Blocklist tab in the top menu bar, then select the Integrations sub-menu. Choose the integration type you need, then click Connect.

If you don't have a CrowdSec Console account, sign up here. On mobile, use the menu icon in the top-right corner, tap Blocklist, then Integrations.

CrowdSec Integrations ScreenCrowdSec Integrations Screen

Configure OPNsense

  1. Create a URL Table (IPs) alias with your desired update frequency. Embed the credentials in the URL using Basic Auth:
https://<username>:<password>@admin.api.crowdsec.net/v1/integrations/<integration_id>/content
  1. Create a firewall rule to block IPs matching the alias.
  2. Verify the alias is populated with your subscribed blocklists.

Here is a walkthrough of the full OPNsense configuration:

Manage integration size limits with pagination

If you want to learn how to manage integration size limits with pagination, please refer to the Managing integrations size limits with pagination section.

Next Steps

Subscribe to blocklists in the Blocklist Catalog to populate your integration.