Remote Access
NetDefense provides secure remote access to your devices through its connection relay. This works even when the device is behind NAT or a firewall, because NDAgent creates an on-demand outbound WebSocket connection to the relay, which then serves as a secure channel.
Connect to a Device
Section titled “Connect to a Device”Open the device from Devices and click Connect. The page that opens has two tabs: Terminal, a shell on the firewall in your browser, and WebAdmin, the firewall’s own web interface through the same tunnel, already signed in. Pop Out moves the terminal to its own window, and Disconnect ends the session. See Device detail.
ndcli device connect fw-hq-primaryThis command establishes a WebSocket tunnel through the connection relay to the device’s NDAgent and automatically launches an interactive shell session on the firewall.
In addition to terminal access, the same command also creates a local port-forwarding tunnel to the device’s web administration interface. You can open your browser and connect to the assigned local port to interact with the firewall’s web UI as if you were directly connected to the local network. The web administration tunnel establishes an automatically authenticated session, so no additional credentials are required.
If you only need terminal access and want to prevent the web administration tunnel from being created, use the --no-webadmin flag:
ndcli device connect fw-hq-primary --no-webadminYou can select your preferred terminal session (the default OPNsense terminal menu or any available shell such as sh, csh, tcsh, etc.) with the Pathfinder Shell setting in the Advanced section of the OPNsense plugin.
When a session ends
Section titled “When a session ends”A remote session ends as soon as either side leaves: you close the console or quit ndcli device connect, the client is killed, or the firewall goes offline. It also ends when someone cancels its Connect task with ndcli task cancel, even after the firewall has joined. With NDAgent 1.29.1 or later, the firewall also ends the shell and any command still running in it. A relay restart ends sessions cleanly too, and the client shows that the session ended (“server restarting”). Open a new session to continue.
Connection limits
Section titled “Connection limits”The relay limits how quickly one IP address can open new sessions. Opening a console uses one connection from your IP and one from the firewall’s IP. When your computer and the firewall share one public IP, for example when you manage the firewall from inside its own network, both connections of a session count against that IP, so you reach the limit sooner. At the limit, ndcli prints relay is rate limiting new sessions (HTTP 429); retry in Ns, and from ndcli 1.45.1 it waits and retries once by itself when the wait is short. The MCP console tools return RATE_LIMITED instead.
Read-only sessions
Section titled “Read-only sessions”A Read-Only member’s session is read-only, and so is every session to a device whose Remote Access Policy is Read-only web UI only: the web administration interface only, with no shell, and no configuration changes. The device enforces this itself, not the browser.
From ndagent 1.20.1, a read-only session also blanks the secrets the device stores — password hashes, private keys, pre-shared keys and the like — and refuses private-key and PKCS#12 exports, dashboard or menu-favorite saves, and actions such as clearing a log or restarting a service. Logs and free-text settings stay readable, and a search of the lists that hold secrets can still recover one, so treat read-only access to a device as access to those secrets. See Read-only sessions are enforced on the device for what’s hidden and what isn’t.