To transfer the node to the mode of operation by serial keys, you need to make the following settings:
In the file cellframe-node.cfg
, change mode=passwd
to mode=serial
or recreate if the mode parameter was missing:
# Central Database authorization
[cdb_auth]
enabled=true
mode=serial
It is possible to use both types of authorization at once, for this the mode=both
mode is used. By default, if the mode parameter is absent, the mode is passwd
.
Serial key generation:
./cellframe-node-cli vpn_cdb serial generate [-n <number of serial keys>] [-acive_days <active days that left for serial>]
By default, one key is generated, but using the -n parameter, you can set the number of keys.
The -acive_days
parameter allows you to limit the operation of the key by time, and sets the number of days that the key will work. Moreover, the countdown begins with the activation of the key.
Example:
./cellframe-node-cli vpn_cdb serial generate -n 4
generated new serial keys:
6S7S-PZ6N-KD97-X9TV
TFBP-SGTZ-CAJQ-9N6X
F46D-CZH8-8X4V-GGJX
PMAV-AT4Q-NY2J-Q5P6
You can add ready-made keys, for this you need to create a file with a list of keys and run the command:
./cellframe-node-cli vpn_cdb serial add -file <file_name> [-active_days <active days that left for serial>]
Example:
./cellframe-node-cli vpn_cdb serial add -file /opt/arch/serials.txt -active_days 5
added serial keys:
'1234-1234-1234-1234' added, days 5
'1234-1234-1234-5432' added, days 5
'1234-1234-1234-543D' already present
'text' invalid, skipped
2 keys added
Command to view already generated serial keys:
./cellframe-node-cli vpn_cdb serial list [-n <How many show serial keys>] [-shift <How many skip serial keys>] [-activated_only|-inactive_only] [-nototal|-total_only]
By default, all keys are shown, using the -n
parameter you can set the maximum number of keys to display.
The -shift
option shifts the beginning of the list.
By default, serial keys are displayed regardless of whether they are activated or not; with the additional parameter -activated_only
, only activated ones will be displayed, and with the parameter -inactive_only
- only inactive ones.
The -nototal
option disables the display of the number of keys.
The -total_only
parameter disables the display of keys and displays only their number.
The following example displays a list of 2 keys, skipping the first:
./cellframe-node-cli vpn_cdb serial list -n 2 -shift 1
serial keys:
TFBP-SGTZ-CAJQ-9N6X inactive
F46D-CZH8-8X4V-GGJX activated
total 2 keys
Serial key update command:
./cellframe-node-cli vpn_cdb serial update -serial <serial keys> -acive_days <active days that left for serial>
You can only update the number of days before blocking.
Example:
./cellframe-node-cli vpn_cdb serial update -serial TFBP-SGTZ-CAJQ-9N6X -active_days 3
serial 'TFBP-SGTZ-CAJQ-9N6X' successfully updated
View command:
./cellframe-node-cli vpn_cdb serial info -serial <serial keys>
Examples:
./cellframe-node-cli vpn_cdb serial info -serial TFBP-SGTZ-CAJQ-9N6X
serial TFBP-SGTZ-CAJQ-9N6X not actitated
license length: 3 days
./cellframe-node-cli vpn_cdb serial info -serial 3VEQ-2GF6-JN8G-QTRS
serial 3VEQ-2GF6-JN8G-QTRS actitated Wed, 24 Jun 20 19:28:36 +0500
expired: no time limit
./cellframe-node-cli vpn_cdb serial deactivate -serial <serial keys>
Example:
./cellframe-node-cli vpn_cdb serial deactivate -serial TFBP-SGTZ-CAJQ-9N6X
serial 'TFBP-SGTZ-CAJQ-9N6X ' deactivated successfully
./cellframe-node-cli vpn_cdb serial delete -serial <serial keys>
Example:
./cellframe-node-cli vpn_cdb serial delete -serial TFBP-SGTZ-CAJQ-9N6X
serial 'TFBP-SGTZ-CAJQ-9N6X ' deleted