Skip to content

Firewall integrations

import { Steps, Tabs, TabItem, Aside } from ‘@astrojs/starlight/components’;

Suricatavel integrates directly with perimeter firewalls to enforce network containment and block hostile traffic detected by Suricata sensors or threat intelligence feeds.


Suricatavel supports the following firewall platforms:

  • pfSense: Integrates via the pfSense REST API (requires the pfsense-api package).
  • OPNsense: Integrates via the native OPNsense REST API (manages firewall Aliases).
  • OpenWrt: Integrates via SSH/LuCI and uci / nftables commands.
  • MikroTik RouterOS: Integrates via the RouterOS v7+ REST API (manages dynamic address-list entries and filter rules).
  • Generic Linux: Integrates via SSH to manage nftables sets or ipset.

To connect a new firewall to Suricatavel:

1. Navigate to **Firewalls** in the main navigation menu. 2. Click **New firewall**. 3. Select the **Type** (pfSense, OPNsense, OpenWrt, MikroTik, or Generic Linux). 4. Provide the management parameters: - **Name**: A descriptive label for the device (e.g., `Edge-Mikrotik-01`). - **IP address / Host**: The management address and port. - **Credentials**: API Key/Secret, username/password, or SSH key depending on the adapter. - **Verify SSL**: Toggle certificate validation for HTTPS connections. 5. Click **Create**.

Suricatavel tests the connection immediately to verify credentials and fetch adapter health.


Suricatavel adds and removes addresses in two sets, and never creates sets or rules: IPv4 addresses go to the set configured for the firewall (suricatavel_blocklist by default) and IPv6 addresses to the same name with _v6. Create both, with timeouts, and a rule that drops what each one holds, in the table of the firewall (inet filter by default):

Terminal window
nft add set inet filter suricatavel_blocklist '{ type ipv4_addr; flags timeout; }'
nft add set inet filter suricatavel_blocklist_v6 '{ type ipv6_addr; flags timeout; }'
nft add rule inet filter input ip saddr @suricatavel_blocklist drop
nft add rule inet filter input ip6 saddr @suricatavel_blocklist_v6 drop

Add the same rules to the forward chain when the host routes traffic, and keep everything in /etc/nftables.conf so it survives a reboot. An ip table needs only the IPv4 set and an ip6 table only the _v6 one. The firewall shows as unhealthy until its sets exist with these types and timeouts and a drop or reject rule matches each.

Logging in without root (iptables, nftables and pf)

Section titled “Logging in without root (iptables, nftables and pf)”

Suricatavel can drive an iptables, nftables or pf (FreeBSD) host as an SSH user that is not root. Use a dedicated user with no other sudo rights and click Provision on the firewall. With any SSH user but root, Suricatavel runs the firewall commands through the helper; with root, it runs them directly:

  • The helper. Provisioning installs /usr/local/sbin/suricatavel-fw, owned by root, plus a sudoers rule that lets that user run it, and nothing else, without a password. To become root during provisioning, it uses the same escalation as sensors: the Privilege escalation method (automatic, sudo or su) and, when it differs from the SSH password, the Escalation password (the root password for su).
  • Why not sudo on iptables or nft. A passwordless sudo rule on iptables, nft or pfctl themselves is close to root: iptables --modprobe=<program> runs any program, and nft -f or pfctl -f print the contents of any file in their errors.
  • What the helper allows. It does only what Suricatavel needs: list, insert and delete rules of a chain with a DROP or REJECT target, get, add, delete and list the elements of an nftables set, and add, delete and list the addresses of a pf table. It checks every argument and refuses anything else.
  • What it does not do. The chain, the sets, the pf table and their drop rules are still yours to create.

You can enforce containment blocks manually or automatically through Policies and Drongo.

To manually block an address:

  1. Navigate to Firewalls > Actions (or click Block IP directly from any Event or Alert).
  2. Click New action.
  3. Select the target Firewall.
  4. Choose the action scope:
    • Source IP: Blocks incoming traffic originating from the malicious address.
    • Destination IP: Blocks outbound traffic targeting the address.
    • Both: Restricts both traffic directions.
  5. Configure the TTL (Time to live):
    • Enter a duration in seconds for a temporary ban (e.g., 3600 for 1 hour).
    • Leave empty or set to 0 to use the Default TTL of the firewall, or a permanent ban when it has none.
  6. Click Save.

The action is dispatched to the selected firewall immediately, and its status is recorded in Firewalls > History.

Each firewall has a Default TTL and a Max TTL, both optional. A block without a TTL takes the default, and the maximum caps every block on that firewall, permanent ones included. The block keeps the TTL that results, and Suricatavel tracks its expiry:

  • A new block of an address never shortens a longer one, and a permanent one stays permanent until it is unblocked.
  • MikroTik address lists and nftables sets also expire the entry on the device.
  • pfSense, OPNsense and OpenWrt have no timeouts. On every firewall, the scheduled suricatavel:prune-expired-blocks command unblocks expired addresses every minute, so blocks there expire only while the scheduler and the firewall queue are running.

To release an active block:

  1. Navigate to Firewalls > Actions.
  2. Locate the active rule in the list.
  3. Click Unblock.

The rule is removed from the target firewall adapter immediately, and the action history is updated.


Suricatavel publishes an active domain feed endpoint listing malicious domains identified by threat feeds and alerts. This endpoint is designed for firewall packages such as pfBlockerNG on pfSense, OPNsense Aliases, or MikroTik DNS address lists.

GET /api/v1/feeds/domains?token=YOUR_PERSONAL_ACCESS_TOKEN

The response returns a plain text list of domains, formatted one entry per line.

1. In pfSense, open **Firewall > pfBlockerNG > DNSBL > Feeds**. 2. Click **Add**. 3. Enter a list name (e.g., `Suricatavel_Domains`). 4. Set **Source URL** to your Suricatavel feed URL including the token. 5. Set **Action** to `Deny` and configure update frequency. 6. Click **Save** and trigger an update. 1. In OPNsense, navigate to **Firewall > Aliases**. 2. Click **Add** (`+`). 3. Set **Type** to `URL Table (IPs)` or `URL Table`. 4. Paste the Suricatavel feed URL into the **Content** field. 5. Set the refresh interval (e.g., `1` day or `12` hours). 6. Click **Save** and **Apply changes**.