Skip to content

Configuration

This guide covers how to configure the NetDefense plugin through the OPNsense web interface.

Accessing NetDefense Settings

  1. Log in to your OPNsense web interface

  2. Navigate to Services > NetDefense > Settings

NetDefense plugin settings in OPNsense

Basic Configuration

The settings page displays the essential configuration options. Click Show advanced options to see all available settings.

Required Settings

SettingDescription
Enable NetDefenseActivates the NetDefense Agent service
Registration TokenUUID token provided by your NetDefense account for device registration

Advanced Settings

Click the toggle to reveal advanced configuration options:

SettingDefaultDescription
Device IDAuto-generatedUnique UUID identifier for this device. Auto-generated on first load if empty.
Server Addresshttps://hub.netdefense.ioNetDefense server URL. Only change if using a self-hosted deployment.
SSL VerificationEnabledVerifies SSL certificates when connecting to the server.
Log LevelINFOControls the verbosity of agent logs (DEBUG, INFO, WARNING, ERROR).

Enabling NetDefense

  1. Navigate to Services > NetDefense > Settings

  2. Check the Enable NetDefense checkbox

  3. Enter your Registration Token

    Your registration token is available from your NetDefense dashboard. It should be in UUID format (e.g., 12345678-1234-1234-1234-123456789abc).

  4. Click Apply

The agent will start and attempt to register with the NetDefense server. Check the Log File to monitor the registration process.

Disabling NetDefense

  1. Navigate to Services > NetDefense > Settings

  2. Uncheck the Enable NetDefense checkbox

  3. Click Apply

This will stop the NetDefense Agent service. The device will go offline in your NetDefense dashboard but will retain its configuration for when you re-enable it.

Configuration Reference

Registration Token

Required

The registration token links your OPNsense device to your NetDefense account. Obtain this token from your NetDefense dashboard:

  1. Log in to your NetDefense account

  2. Navigate to Devices > Add Device

  3. Copy the registration token provided

Device ID

Auto-generated

Each device requires a unique identifier. The Device ID:

  • 🔄 Is automatically generated when the settings page first loads
  • 🔁 Can be reset using the Reset ID button
  • ✅ Must be in valid UUID format

Server Address

Advanced

The server address specifies which NetDefense server the agent connects to:

  • ☁️ Default: https://hub.netdefense.io (NetDefense cloud service)
  • 🏢 Self-hosted: Enter your self-hosted NetDefense server URL (e.g., https://netdefense.example.com:8443)

SSL Verification

Advanced

When enabled (default), the agent verifies the SSL certificate of the NetDefense server. Disable only if:

  • 🔏 Using a self-signed certificate on a self-hosted deployment
  • 🔍 Troubleshooting connectivity issues

Log Level

Advanced

Controls the verbosity of the NetDefense Agent logs:

LevelDescription
DEBUGDetailed diagnostic information. Use for troubleshooting.
INFOGeneral operational information (recommended for production).
WARNINGWarning messages for potentially harmful situations.
ERRORError events that might still allow the agent to continue running.

Viewing Service Status

Via Web Interface

Navigate to Services > NetDefense > Log File to view real-time agent logs. This integrated log viewer shows:

  • ▶️ Service start/stop events
  • 📝 Registration status
  • 🔗 Connection events
  • ✅ Task execution results
  • ⚠️ Any errors or warnings

Via Command Line

Terminal window
service ndagent status
tail -f /var/log/ndagent.log
grep ndagent /var/log/messages

Applying Configuration Changes

After making any configuration changes:

  1. Click the Apply button at the bottom of the settings page

  2. The service will automatically restart with the new configuration

  3. Check the Log File page to confirm the service started successfully

User Permissions

Access to the NetDefense plugin requires the Services: NetDefense permission. To grant access:

  1. Navigate to System > Access > Groups

  2. Edit the desired group

  3. Under Assigned Privileges, add Services: NetDefense

  4. Save the changes

This grants access to:

  • ⚙️ NetDefense settings page
  • 📋 NetDefense log viewer
  • 🔌 NetDefense API endpoints