Skip to content

Installation

This guide explains how to install the NetDefense plugin on your OPNsense firewall. Choose the installation method that best fits your deployment scenario.

Before installing the NetDefense plugin, make sure you have:

  • OPNsense 25.7 on FreeBSD 14 (amd64)
  • Administrative (root) access to the OPNsense device
  • Outbound network connectivity to repo.netdefense.io
  • A NetDefense account with an available registration token

Pick the method that matches your scenario:

  • Quick Install — One-line curl … | sh. Sets up the repository and installs the plugin; you finish configuration from the OPNsense web UI. Best for first-time installs and operators who want to inspect settings before going live.
  • Unattended Install — One-line curl … | sh -s -- --auto-setup=<token>. Drops the registration token, generates a device UUID, provisions the OPNsense API user/key, and starts the agent. Only NetDefense-side device approval remains manual. Best for SSH automation, IaC pipelines, fleet rollouts.
  • Manual Repository — Each step run individually: install fingerprint, write repo config, pkg update, pkg install. Best when you want to audit every step.
  • Offline Package — Download the .pkg once, transfer to an air-gapped OPNsense, pkg add. No automatic updates afterwards.

A single command sets up the repository and installs the plugin:

Terminal window
curl -sSL https://repo.netdefense.io/install.sh | sh

The script:

  • Installs the repository fingerprint
  • Writes the NetDefense repository configuration
  • Updates the package database
  • Installs the NetDefense plugin

After the script completes, verify the installation:

Terminal window
pkg info os-netdefense

After installing the plugin, you’ll need to configure it before use. The NetDefense plugin will now appear in the OPNsense web interface under Services > NetDefense.

NetDefense plugin settings in OPNsense

Proceed to the Configuration guide to complete the setup.

To confirm the plugin was installed correctly:

  1. Via Web Interface: Navigate to Services > NetDefense — the settings page should load without errors

  2. Via Command Line:

    Terminal window
    pkg info os-netdefense
    service ndagent status
ParameterValueDescription
urlhttps://repo.netdefense.io/prod/opnsenseRepository base URL
priority5Repository priority
enabledyesEnable the repository
signature_typefingerprintsSHA256 signature verification
fingerprints/usr/local/etc/pkg/fingerprints/netdefenseFingerprint directory

For extra assurance, you can verify the fingerprint from more than one source before installing: