CLI commands

The FortiAuthenticator has CLI commands that are accessed using SSH, or Telnet. Their purpose is to initially configure the unit, perform a factory reset, or reset the values if the GUI is not accessible.

Command Description

help

Display list of valid CLI commands. You can also enter ? for help.

exit

Terminate the CLI session.
Command Description

show

Display bootstrap configuration.

set port1-ip <IP/netmask>

Enter the IPv4 address and netmask for the port1 interface. Netmask is expected in the /xx format, for example 192.168.0.1/24.
Once this port is configured, you can use the GUI to configure the remaining ports.

set default-gw <IP>

Enter the IPv4 address of the default gateway for this interface. This is the default route for this interface.

set date <YYYY-MM-DD>

Enter the current date. Valid format is four digit year, 2 digit month, and 2 digit day. For example: set date 2014-08-12 sets the date to August 12th, 2014.

set time <HH:MM:SS>

Enter the current time. Valid format is two digits each for hours, minutes, and seconds. 24-hour clock is used. For example 15:10:00 is 3:10pm.

set tz <timezone_index>

Enter the current time zone using the time zone index. To see a list of index numbers and their corresponding time zones, enter set tz ?.

set ha-mode {enable | disable}

Enable or disable (default) HA mode.

set ha-port <interface>

Select a network interface to use for communication between the two cluster members. This interface must not already have an IP address assigned and it cannot be used for authentication services. Both units must use the same interface for HA communication.

set ha-priority {high | low}

Set to Low on one unit and High on the other. Normally, the unit with High priority is the master unit.

set ha-password <password>

Set the HA password.

set ha-mgmt-ip <IP/netmask>

Enter the IP address, with netmask, that this unit uses for HA related communication with the other FortiAuthenticator unit. Format: 1.2.3.4/24.
The two units must have different addresses. Usually, you should assign addresses on the same private subnet.

set ha-mgmt-access {ssh | https | http | telnet}

Select the types of administrative access to allow.

set ha-dbg-level <level>

Enter the level for HA service debug logs. Range: -4 (fatal) to 4 (debug high). Default: -2 (Warn).

unset <setting>

Restore default value. For each set command listed above, there is an unset command, for example unset port1-ip.
Command Description

raid-add-disk <slot>

Add a disk to a degraded RAID array.
Command Description

ha-rebuild

Rebuild the configuration database from scratch using the HA peer's configuration.

restore-admin

Restore factory reset's admin access settings to the port1 network interface.

reboot

Perform a hard restart of the FortiAuthenticator unit. All sessions will be terminated. The unit will go offline and there will be a delay while it restarts.

factory-reset

Enter this command to reset the FortiAuthenticator settings to factory default settings. This includes clearing the user database.
This procedure deletes all changes that you have made to the FortiAuthenticator configuration and reverts the system to its original configuration, including resetting interface addresses.

shutdown

Turn off the FortiAuthenticator.

status

Display basic system status information including firmware version, build number, serial number of the unit, and system time.
Command Description

hardware-info

Display general hardware status information.

disk-attributes

Display system disk attributes.

disk-errors

Display any system disk errors.

disk-health

Display disk health information.

disk-info

Display disk hardware status information.

raid-hwinfo

Display RAID hardware status information.
Command Description

nslookup

Basic tool for DNS debugging.

dig

Advanced DNS debugging.

ping

Test network connectivity to another network host.

tcpdump

Examine local network traffic.

tcpdumpfile

Same as tcpdump, but the output is written to a file downloadable that can be downloaded in the GUI.

traceroute

Examine the route taken to another network host.
Chapter: Setup > CLI commands