10.3. Commands

In this section, you can create command groups intended to be sent to connectors.

To create a group of commands, follow these steps:

Task

Description

Step 1. Create a group.

Click Add in the Command groups pane and provide a name, description, and type for the list.

Step 2. Specify the update URL (optional).

If the list is updatable, set the update server URL. For more details on updatable lists, see later in this chapter.

Step 3. Specify the commands.

Click Add in the Commands pane and specify the name and text of the command.

Use curly brackets ({}) to define variables used to insert actual values or other inner placeholders.

The administrator can create custom command lists and distribute them centrally to all UserGate devices. To create such a list, follow these steps:

Task

Description

Step 1. Generate a file with the relevant command list.

Create a file named list.txt with the command list.

Step 2. Create an archive containing this file.

Put the file in a ZIP archive named list.zip.

Step 3. Create a version file for the list.

Create a file named version.txt and specify the list version number inside it, such as 3. On each update of the list, the version number must be incremented.

Step 4. Upload the files to a web server.

Upload the list.zip and version.txt files to your website so that they can be downloaded.

Step 5. Create a command list and specify an update URL for it.

On each UserGate server, create a command list. When creating the list, select Updatable as the list type and enter the address for downloading updates. UserGate will check for a new version on your website according to the set update download schedule. The schedule can be configured in the list properties. The available options are:

  • Disabled: update checking will not be performed for the selected item.

  • Daily.

  • Weekly.

  • Monthly.

  • Every ... hours.

  • Every ... minutes.

  • Advanced.

With the Advanced option, a crontab-like format is used where the date/time string consists of six space-separated fields. The fields specify the time as follows: (minutes: 0-59) (hours: 0-23) (days of the month: 1-31) (month: 1-12) (days of the week: 0-6, where 0 is Sunday). Each of the first five fields can be defined using:

  • An asterisk (*): denotes the entire range (from the first number to the last).

  • A dash (-): denotes a number range. For example, "5-7" means 5, 6, and 7.

  • Lists: comma-separated numbers or ranges. For example, "1,5,10,11" or "1‑11,19-23".

An asterisk or range spacing: used for spacing out values in ranges. The increment is given after a slash. Examples: "2-10/2" means "2,4,6,8,10" while "*/2" in the "hours" field means "every two hours".

By clicking Export/Import, the administrator can export or import command groups. To import list, create a file containing commands in the following format: COMMAND_NAME:COMMAND_TEXT (use curly brackets to define variables).