### Example HA Configuration - Backup Node Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/ha.html Example commands for configuring backup nodes in a high availability setup, including setting IDs, IP addresses, ports, and intervals. ```bash set ha id 2 set ha ip 192.0.2.11 set ha port 322 set ha interval 500 ``` ```bash set ha id 3 set ha ip 192.0.2.12 set ha port 322 set ha interval 500 ``` -------------------------------- ### Install Image Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Installs an existing image in the `img` format from the specified path. ```bash vamgr install ``` -------------------------------- ### Example SNMP Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/snmp.html An example demonstrating a complete SNMP configuration, including listener, community, access level, description, and location settings. ```bash set snmp listener 192.0.2.1 161 TCP set snmp listener 192.0.2.1 161 UDP set snmp community SNMPcom 0.0.0.0/0 set snmp community SNMPcom 0.0.0.0/0 access RW set snmp description "TDC 1" set snmp location "Data Center" ``` -------------------------------- ### Example HA Configuration - Master Node Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/ha.html Example commands for configuring the master node in a high availability setup, including setting IDs, IP addresses, ports, intervals, and the shared cluster IP. ```bash set ha id 1 set ha ip 192.0.2.10 set ha port 322 set ha interval 500 set ha cluster-ip 192.0.2.1 ``` -------------------------------- ### Example: Create Rule Set for Group Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/management-system.html This example demonstrates creating a user group, a rule set, and assigning permissions to allow all actions for that group. ```bash set groups name users set rule-list allow-change group users set rule-list allow-change rule allow-change set rule-list allow-change rule allow-change action permit set rule-list allow-change rule allow-change access-operations * ``` -------------------------------- ### Example Real Server Pool Configuration by IP Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/real-server.html An example demonstrating the configuration of a Real Server Pool using IP addresses, including setting the ID, assigning a real server with weight, specifying an IP set, assigning a health check, and adding a description. ```bash set id rs_port_22 set id rs_port_22 rs 192.0.2.1 22 weight 1 set id rs_port_22 ipset-id ha_node_1 set id rs_port_22 hc-id combo set id rs_port_22 description "tcp rs" ``` -------------------------------- ### List Installed Images (Simple Format) Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Displays a simple, unformatted list of installed images. This is useful for scripting or quick checks. ```bash vamgr list -p ``` -------------------------------- ### Example HTTP Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html A comprehensive example demonstrating the configuration of an HTTP health check with various parameters. ```bash set health-check id http_hc set health-check id http_hc HTTP set health-check id http_hc HTTP interval 10 set health-check id http_hc HTTP timeout 5 set health-check id http_hc HTTP try 1 set health-check id http_hc HTTP success-try 1 set health-check id http_hc HTTP source-ip 192.0.2.1 set health-check id http_hc HTTP method POST set health-check id http_hc HTTP uri / set health-check id http_hc HTTP status-codes 200 set health-check id http_hc HTTP status-codes 202 set health-check id http_hc HTTP response-string set health-check id http_hc HTTP headers Host:123 set health-check id http_hc HTTP reverse false ``` -------------------------------- ### Example TCP Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html A complete example demonstrating the sequence of commands to configure a new TCP health check with specific parameters. ```bash set health-check id tcp-new set health-check id tcp-new TCP set health-check id tcp-new TCP interval 10 set health-check id tcp-new TCP timeout 5 set health-check id tcp-new TCP try 1 set health-check id tcp-new TCP success-try 1 set health-check id tcp-new TCP target-port 88 ``` -------------------------------- ### Example HTTPS Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html A complete example demonstrating the configuration of an HTTPS health check with various parameters. ```bash set health-check id https_hc set health-check id https_hc HTTP set health-check id https_hc HTTP interval 10 set health-check id https_hc HTTP timeout 5 set health-check id https_hc HTTP try 1 set health-check id https_hc HTTP success-try 1 set health-check id https_hc HTTP source-ip 192.0.2.1 set health-check id https_hc HTTP method POST set health-check id https_hc HTTP uri / set health-check id https_hc HTTP status-codes 200 set health-check id https_hc HTTP status-codes 202 set health-check id https_hc HTTP response-string ``` -------------------------------- ### Example Python Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html This example demonstrates a complete configuration for a user health check using a Python script. ```bash set health-check id user01 set health-check id user01 USER set health-check id user01 USER interval 7 set health-check id user01 USER timeout 5 set health-check id user01 USER try 2 set health-check id user01 USER success-try 2 set health-check id user01 USER script httptcp.py ``` -------------------------------- ### Upgrade Image from Archive Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Installs a new image from a `.tar.gz` archive. The installed image automatically gets priority for loading. ```bash vamgr upgrade ``` -------------------------------- ### Default NACM Configuration Example Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/management-system.html Provides an example of the default Network Access Control Management (NACM) configuration, including enabled NACM, default read/write/exec permissions, and rule lists for admin and operator roles. ```bash set nacm enable-nacm true set nacm read-default deny set nacm write-default deny set nacm exec-default deny set nacm rule-list admin set nacm rule-list admin group tdadmin set nacm rule-list admin rule allow-all set nacm rule-list admin rule allow-all path / set nacm rule-list admin rule allow-all access-operations * set nacm rule-list admin rule allow-all action permit set nacm rule-list operator set nacm rule-list operator group tdoperator set nacm rule-list operator rule allow-read set nacm rule-list operator rule allow-read path / set nacm rule-list operator rule allow-read access-operations read set nacm rule-list operator rule allow-read action permit ``` -------------------------------- ### List Installed Images Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Displays a list of all images currently installed on the system. This provides an overview of available images. ```bash vamgr list ``` -------------------------------- ### Example ICMP Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html A complete example demonstrating the configuration of an ICMP health check with various parameters. ```bash set health-check id icmp-new set health-check id icmp-new ICMP set health-check id icmp-new ICMP interval 10 set health-check id icmp-new ICMP timeout 5 set health-check id icmp-new ICMP try 1 set health-check id icmp-new ICMP success-try 1 set health-check id icmp-new ICMP target-ip 192.0.2.10 ``` -------------------------------- ### Example Bash Health Check Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/healthcheck.html This example shows a complete configuration for a user health check using a Bash script, including a target IP address. ```bash set health-check id user02 set health-check id user02 USER set health-check id user02 USER interval 5 set health-check id user02 USER timeout 2 set health-check id user02 USER try 2 set health-check id user02 USER success-try 2 set health-check id user02 USER target-ip 192.0.2.10 set health-check id user02 USER script httptcp.sh ``` -------------------------------- ### Example HA Configuration - Remote Node Interaction Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/ha.html Example commands for configuring the interaction parameters between Termidesk Connect nodes in a high availability cluster, specifying remote node names and their identifiers. ```bash set ha remote NodeTDC15-2 id 2 ``` ```bash set ha remote NodeTDC15-1 id 1 ``` -------------------------------- ### Verify Running Configuration Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/network.html Displays the current running configuration of the dynamic routing setup. Use this to confirm changes. ```bash show running-config ``` -------------------------------- ### Listing Backup Copies with Metadata Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Displays a list of backup copies, including comment, author, and email address information. The example shows the format of the output. ```bash snag list -c -a -e > 45b768a 2025-08-13 14:21:02 Created standard snapshot snag user@site.domain ``` -------------------------------- ### Create Virtual Server for TCP Balancing Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/cli/set/object-vs.html Creates a Virtual Server for TCP load balancing. Configuration is identical to HTTP setup, with the exception of HTTP-specific profiles. ```APIDOC ## set vs TCP ### Description Creation of Virtual Server for balancing using the TCP protocol. The setup is identical to the HTTP setup, except: * `http-profile-id` (not applicable for this type of Virtual Server); ### Method APICALL ### Endpoint set vs TCP ``` -------------------------------- ### Lua Path Matching Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/lua.html Examples of Lua expressions for matching URL paths. ```lua if client.http_req.path == "/abcZxc" ``` ```lua if client.http_req.path == "/abc" ``` ```lua if (client.http_req.path:find("zx")) ``` -------------------------------- ### Displaying snag Tool Help Information Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Execute this command to get information on the main commands of the snag tool. ```bash snag -h ``` -------------------------------- ### Show configuration cli ip with grep Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/cli/command-show.html Example of using 'show configuration cli ip' and piping the output to 'grep' to filter for specific lines containing 'ha-type LOCAL'. ```bash show configuration cli ip | grep ha-type LOCAL ``` ```bash set ip address 192.0.2.120 /24 ha-type LOCAL set ip route vrf_custom 198.51.100.1/24 203.0.113.10 ha-type LOCAL ``` -------------------------------- ### Python Health Check Script Example Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/script-healthcheck.html This script performs an HTTP GET request to a target address and port, exiting with code 0 on success. It requires the 'requests' library and parses JSON arguments. ```python import requests import sys import json config = json.loads(sys.argv[1]) target_ip = config["target-ip"] target_port = config["target-port"] response = requests.get(f"http://{target_ip}:{target_port}", timeout=5) response.raise_for_status() sys.exit(0) ``` -------------------------------- ### Initializing Backup Repository with Overwrite Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Initializes a backup repository, overwriting any existing repository. ```bash snag init -f ``` -------------------------------- ### Initializing a Backup Repository Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/system-config/images-backups.html Initializes a repository for storing backup copies using the snag tool. ```bash snag init ``` -------------------------------- ### Create a Virtual Server Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/virtual-server.html Use this command to create a new Virtual Server for RAPID-UDP load balancing. Replace `` with a unique identifier for your server. ```bash set vs RAPID-UDP ``` -------------------------------- ### Create a Virtual Server Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/traffic-management/virtual-server.html Use this command to create a new Virtual Server for RAPID-TCP load balancing. Replace `` with the desired name for your virtual server. ```bash set vs RAPID-TCP ``` -------------------------------- ### Show command with utility piping Source: https://termidesk.ru/docs/en-connect-doc/v1.3/documentation/settings/cli/command-show.html Demonstrates piping the output of the 'show' command to a standard utility for further processing. ```bash show