SonicOS 8 NSv Getting Started Guide for ESXi

Launching the NSv Command Line Interface Using SSH

The SonicWall NSv command-line interface (CLI) lets administrators directly configure, monitor, and troubleshoot the firewall. The CLI is most useful during initial setup, recovery, and advanced administration.

Prerequisites

Before launching the NSv CLI using SSH, ensure the following:

  • The NSv virtual machine is running
  • You have NSv administrator credentials
  • The NSv has a reachable management IP address
  • SSH is enabled on the NSv
  • Port 22 is allowed by firewall and platform security rules
  • Ensure that an SSH client is available on the system

Use VM console access when SSH is not enabled

To launch the NSv CLI using SSH

  1. Launch the SSH client.

  2. In the Host Name (or IP address) field, enter the public IP address of the NSv.

  3. In the Port field, enter 22 if it is not already set.

    Using an SSH port other than 22 can block access because SonicCoreX only listens on port 22, and NSv uses the same SSH entry point for both the SonicCoreX console and the SonicOS CLI. If you change the SSH port in SonicOS, SonicCoreX cannot use it, and you may lose access to both consoles.

  4. For Connection type, ensure that SSH is selected. This option is selected automatically when you specify port 22.

  5. Click Open.

  6. At the login prompt, enter the SonicOS administrator credentials.

The following table describe the CLI commands and their usage.

The command syntax, usage, and description can be displayed by typing the command in the SonicCoreX CLI console, followed by a space and a question mark (?).

Command Syntax Description Example
date
  • date set <"mm/dd/yyyy HH:MM:SS">
  • date read
Sets and Displays the current date.

date set "02/12/2023 12:23:12"

OR

date read

dhcp dhcp interface <interface name> Enables dhcp on an interface in safe mode. dhcp interface X1
dns
  • dns primary <dns1>
  • dns primary <dns1> secondary <dns2>
Configures DNS server in safe mode

dns primary 8.8.8.8

OR

dns primary 8.8.8.8 secondary 8.8.4.4

dns-lookup dns-lookup <string> Runs the DNS query for the Domain given as a parameter. dns-lookup www.google.com
exit exit Exits the SonicCoreX with CLI console and switch to safemode menu. exit
help help It shows the default help of the SonicCoreX with CLI console. help
network network interface <interface name> ip <ip address> netmask <netmask> gateway <gateway ip> Configures network in safemode.

network interface enp11s0 ip 10.203.78.81

netmask 255.255.255.0 gateway 10.203.78.1

ping
  • ping <ip/hostname>
  • ping ip <ip/hostname>
  • ping ip6 <ip/hostname>
Runs the ping command on the mentioned IP address or String

ping google.com

OR

ping ip google.com

OR

ping ip6 <ipv6 address>

restart restart
  • Restarts the firewall in normal mode again without any parameters.
  • Restarts the firewall in safemode with'enter-safemode' parameter.

restart

OR

restart enter-safemode

safemode safemode Restarts the firewall in safemode. safemode
show (normal mode)
  • show system
  • show sonicos
  • show status
  • show network
  • show dns
  • show logs
  • Shows system information
  • Shows sonicos information
  • Shows status information
  • Shows network information
  • Shows dns information
  • Shows logs information

show system

OR

show sonicos

OR

show network

OR

show dns

OR

show logs

shutdown shutdown Shuts down the firewall. shutdown
support-data support-data Sends logs to support. support-data
update
  • update check
  • update download
  • update install
Checks, downloads, and installs an available update.

update check

OR

update download

OR

update install

update-channel
  • update-channel read
  • update-channel set <channel name>
  • update-channel restore
It is used to modify/read/restore the update channel to deliver updates.

update-channel read

OR

update-channel set <channel name>

OR

update-channel restore