Skip to content

Updating

The NetDefense plugin ships through OPNsense’s standard package system, so updates flow through the same channels as everything else on the device.

The NetDefense repository is registered alongside the official OPNsense repositories. In practice:

  • NetDefense updates are included in standard pkg upgrade operations
  • Updates apply during scheduled firmware updates
  • No manual steps are needed for routine updates

The easiest way to keep NetDefense updated is through OPNsense’s built-in update system:

  1. Navigate to System > Firmware > Updates

  2. Click Check for updates

  3. If updates are available (including NetDefense), click Update

  4. The system will download and apply all available updates

NetDefense updates will be applied along with any other pending updates.

If you have configured automatic updates in OPNsense, NetDefense will be updated automatically:

  1. Navigate to System > Settings > Cron

  2. Verify your firmware update schedule

  3. NetDefense updates will be included in these scheduled updates

If you prefer to update NetDefense specifically or need to update outside the normal schedule:

Terminal window
pkg update -f
pkg upgrade os-netdefense
pkg upgrade

The installed plugin version can be found at:

System > Firmware > Plugins

Look for os-netdefense in the list of installed plugins.

Terminal window
pkg info os-netdefense

This displays the installed version along with other package details.

OPNsense surfaces update notifications in the web interface when new versions are available:

  • A notification badge appears on the System menu
  • Available updates are listed on the System > Firmware > Updates page

OPNsense Compatibility

NetDefense supports:

  • OPNsense 26.1.11 and later
  • FreeBSD 14 and FreeBSD 15 base systems (amd64)

On an earlier release, upgrade OPNsense first — see Prerequisites.

Update Safety

Updates preserve:

  • All configuration settings
  • Device registration status
  • Log history

Agent 1.23.0 and Managed Rules and Aliases

Section titled “Agent 1.23.0 and Managed Rules and Aliases”

From 1.23.0, a rule or alias snippet describes the whole object, and PREPEND and APPEND rules are placed within each OPNsense rule section — see RULE and ALIAS fields and Where Rules Land on the Device. The first sync that reaches a device after its agent is upgraded can change the device even if no template changed:

  • PREPEND rules an older agent placed after the device’s own rules move ahead of them. On OPNsense 26.7 the default LAN allow rules sit at sequence 1 and 11, which older agents’ PREPEND rules came after.
  • To make room, the device’s own rules can get higher sequence numbers. Each change is a separate configuration revision on the device, and each is listed in the sync result.
  • A setting made by hand on a managed rule or alias, and missing from its snippet, is reset to OPNsense’s default: an alias’s GeoIP address families, URL-table refresh and authentication, expiry or categories, or a rule’s logging, for example.
  • A rule or alias whose snippet sets a field the device’s OPNsense doesn’t have is refused, and the device keeps the one it had.

From 1.22.1, the agent checks for OPNsense updates every 6 hours, give or take up to 25 minutes so that a fleet doesn’t check all at once. It also checks once after each boot of the firewall, after the installed OPNsense version changes, and after a firmware upgrade run through NetDefense. Older agents checked every 15 minutes.

Each check downloads about 0.5 MB from the OPNsense mirror. A check you start yourself under System > Firmware counts as well: the agent picks up its result at its next refresh, within 15 minutes. The Dashboard and each device page show when the device last checked.

A firewall that reaches NetDefense directly needs nothing. For one behind an inspection proxy, including one that updates automatically with OPNsense:

  1. Before the upgrade, save the proxy’s CA certificate on the firewall, where only root can change it — see Extra CA File for the requirements.

  2. Right after the upgrade, enter its path in Services > NetDefense > Settings, under Advanced Settings, Control Plane, Extra CA File, and click Apply.

Do this on the firewall itself, through its web interface or a root shell. A NetDefense remote session can’t reach a device while it’s offline.

After updating, verify the plugin is working correctly:

  1. Check the service status

    Terminal window
    service ndagent status
  2. Review the logs for any errors

    Navigate to Services > NetDefense > Log File

  3. Verify connectivity in your NetDefense dashboard

    The device should remain online and connected after the update.

If the update process fails:

  1. Clear the package cache and retry:

    Terminal window
    pkg clean -a
    pkg update -f
    pkg upgrade os-netdefense
  2. Check for dependency conflicts:

    Terminal window
    pkg check -d

If the agent fails to start after an update:

  1. Check the logs:

    Terminal window
    tail -50 /var/log/ndagent.log
  2. Verify configuration integrity:

    Navigate to Services > NetDefense > Settings and click Apply

  3. Manually restart the service:

    Terminal window
    service ndagent restart

See the Troubleshooting guide for more detailed solutions.