Execute Commands

These commands have the following structure:

Admin@nodename# execute <command-name>

Available commands:

Parameter

Description

update

Update:

  • software-updates: software update

  • libraries-updates: library update. You can update all libraries at once or individual libraries.

traceroute

Traceroute the connection to a specified host. Available parameters:

  • hostname <ip-or-domain>: IP address or domain name for which tracing is performed.

  • interface <iface-name>: the interface from which packets will be sent

  • not-map-ip: do not search the hostname for the IP address when displaying

  • use-icmp-echo: use ICMP echo.

  • port: specify a port instead of the default port (1-65535).

  • min-interval: minimum interval between packets.

Admin@nodename# execute traceroute hostname <hostname>

license

The product registration command has the following structure:

Admin@nodename# execute license activate <pin-code>

Provide your product activation code a <pin-code>.

termination

Close the administrator sessions. For more details, see Configuring administrator sessions.

cache

Clear LDAP record cache:

  • ldap-clear.

check-geoip

Checking the ownership of an IP address using the current GeoIP database.

ping

Ping a specific host. Available parameters:

  • hostname: the IP address or domain name of the server.

  • count: the number of echo requests to send. If not specified, the system will send the packets until the user terminates the connection (to terminate sending, press Ctrl+C).

  • numeric: do not resolve names.

  • timestamp: display timestamps.

  • interval: the time between sent packets (in seconds).

  • ttl: the packet's time to live.

  • interface: the address of the selected interface will be used as the source address for running ping.

  • mtu: the MTU size of the sent packets.

  • virtual-router: virtual router name.

Admin@nodename# execute ping hostname <hostname> count <number>

reboot

Reboot the UserGate server.

date

View the current date and time on the server.

shutdown

Shutting down the UserGate server.

netcheck

Check the availability of a third-party HTTP/HTTPS server. You can use the following parameters:

  • address: the host's domain name for checking availability over TCP or URL for HTTP

  • dns-ip: the DNS server's IP address

  • dns-tcp: use TCP instead of UDP for DNS request

  • check-cert: check the SSL certificate

  • type: check availability over:

    • http.

    • tcp (if no port is specified, port 80 is used by default).

  • data: request the site content. Only headers are requested by default.

  • timeout: the maximum time to wait for a reply from the web server.

  • user-agent: parameter to specify the browser type (useragent). Some sites may only allow access from certain browsers. The parameter value is specified in double quotes.

Admin@nodename# execute netcheck type tcp address <host-domain-name> data on Admin@nodename# execute netcheck address <host-domain-name>

dig

Check the domain DNS record.

  • hostname: the host's domain name or IP address for reverse lookup

  • reverse-lookup: get the host from the IP address

  • dns: specify the IP address of the DNS server

  • tcp: use TCP instead of UDP.

Admin@nodename# execute dig hostname <host-domain-name> Admin@nodename# execute dig hostname <IP-address> reverse-lookup on

configurate-cluster

Generate the secret code required for adding a new node to the configuration cluster:

Admin@nodename# execute configurate-cluster generate-secret-key <parameter>

  • secret: the key for secret code generation in the [0-9a-zA-Z]+#[0-9a-zA-Z]+ format (e.g., example#key)

  • expiration-time: the expiration time of the code in seconds

  • request-limit: the validity time of the code generation request

Important! Using this command requires a Cluster module license, otherwise an error message will be displayed.

mc-force-disconnect

The command for an emergency disconnection of the node from the MC with which it was integrated. Depending on the command's argument, the objects imported from MC are saved locally or deleted:

  • keep: disconnect from MC and keep all imported objects (libraries, rules, etc.). The objects imported from MC are converted to local ones.

  • delete: disconnect from MC and delete all imported objects (libraries, rules, etc.). The imported objects that are currently in use are converted to local ones.

Admin@nodename# execute mc-force-disconnect keep Admin@nodename# execute mc-force-disconnect delete

firewall

Firewall operations:

  • force-changes: reapply all firewall rules and terminate current sessions.

restore-mac

Restore the MAC address of the interface.

Some of the commands listed above, except for product update, product registration, administrator session management, and cache clearing are also available in the diagnostics and monitoring mode. To execute them, use the following command:

Admin@nodename> <command-name>