Syntax for the CLI command Extc
Last adaptation to the version: 14.0.1 (01.2025)
New:
- Neue Befehle: extc cleanup overview, extc cleanup execute, extc valuelist get_with_state
- New global variable: GLOB_BLOCK_ADDRESSES (v14.0)
- New Section: Application examples (v14.0)
This article refers to a Beta version
General commands
| Command | Parameter | Description | Example |
|---|---|---|---|
extc cleanupextc cleanup overviewextc cleanup overview notemptyNew as of v14.0.1 |
Displays all invalid variables from multiple Extc applications/variables | extc cleanup overview [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Specific application | ||
| variables | List of variable names | ||
extc cleanup executeextc cleanup execute notemptyNew as of v14.0.1 |
Removes invalid entries, then lists changed variables with new (valid) values | extc cleanup execute [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Specific application | ||
| variables | List of variable names | ||
extc valuelistextc valuelist get_with_stateextc valuelist get_with_state notemptyNew as of v14.0.1 |
Reading several Extc applications/variables including information about the status (valid / invalid) | extc valuelist get_with_state [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Specific application | ||
| variables | List of variable names | ||
extc valuelist setextc valuelist set |
Setting the values of several variables | extc valuelist set [ { application "dhcprelay4" values [ { variable "INTERFACES" value [ "LAN1" ] } { variable "SERVER" value [ "192.168.42.121" ] } ] } { application "dhcprelay6" values [ { variable "INTERFACES" value [ "LAN2" "LAN3" ] } ] } ] | |
| application | Specific application | ||
| values | List of value assignments to specific variables | ||
| variable | Certain variable | ||
| value | New value of the variable | ||
extc valuelist defaultextc valuelist default |
Reading the default values of several Extc applications/variables | extc valuelist default [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Specific application | ||
| variables | List of variable names | ||
extc valuelist getextc valuelist get |
Reading several Extc applications/variables | extc valuelist get [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Specific application | ||
| variables | List of variable names | ||
extc templateextc template editextc template edit |
Editor for editing a template | extc template edit template "/etc/mailfilter_template_urlfilter" | |
| template | File path of the template on the UTM | ||
extc template setextc template set |
Setting the content of a template | extc template set template "/etc/mailfilter_template_urlfilter" content "test" | |
| template | File path of the template on the UTM | ||
| content | New content of the template | ||
extc template getdiffextc template getdiff |
Output of a complete template and the changes compared to the default value | extc template getdiff template "/etc/mailfilter_template_urlfilter" | |
| template | File path of the template on the UTM | ||
extc template getextc template get |
Output of a complete template | extc template get template "/etc/mailfilter_template_urlfilter" | |
| template | File path of the template on the UTM | ||
extc runtimevarextc runtimevar deleteextc runtimevar delete |
Deleting a runtime variable | extc runtimevar delete variable "PROVIDER_DNS" | |
| variable | Certain variable | ||
extc runtimevar setextc runtimevar set |
Setting the value of a runtime variable | extc runtimevar set variable "PROVIDER_DNS" value "192.168.1.253" | |
| variable | Certain variable | ||
| value | Value of the new variable | ||
extc runtimevar getextc runtimevar get |
Output of all runtime variables | extc runtimevar get | |
extc globalextc global defaultsextc global defaults |
List all global variables with their default values | extc global defaults | |
extc global resetextc global reset |
Resets the content of a global variable to the factory setting | extc global reset variable "GLOB_ADMIN_EMAIL" | |
| variable | Certain variable | ||
extc global getextc global get |
List all global variables | extc global get | |
extc global setextc global set |
Setting the value of a global variable | extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } notempty New variable GLOB_BLOCK_ADDRESSES | |
| variable | Certain variable | ||
| value | New value of the variable | ||
extc global newextc global new |
Creating a new global variable | extc global new variable "GLOB_NEW_VARIABLE" value "1234567890" | |
| variable | Certain variable | ||
| value | Value of the new variable | ||
extc deleteextc delete |
Removing a variable | extc delete variable "new_variable" application "http_proxy" | |
| variable | Certain variable | ||
| application | Specific application | ||
extc newextc new |
Creating a new variable | extc new variable "new_variable" application "http_proxy" value "test" | |
| variable | Name of the new variable | ||
| application | Application of the variable | ||
| value | Value of the new variable | ||
extc applicationextc application getextc application get |
List all applications | extc application get | |
extc variableextc variable getextc variable get |
Reading the variables of an application | extc variable get application "http_proxy" | |
| application | Specific application | ||
extc valueextc value defaultextc value default |
Output of the variables with the values of the factory setting | Alle Anwendungen: extc value default Bestimmte Anwendung: extc value default application "webserver" | |
| application (optional) | Specific application | ||
extc value resetextc value reset |
Resets the content of a variable to the factory setting | extc value reset application "cvpn" variable "RDP2VNC_PORT" | |
| application | Specific application | ||
| variable | Certain variable | ||
extc value setextc value set |
Setting the value of a variable | extc value set application "http_proxy" variable "VIRUSSCAN_ENGINE" value "csamd" | |
| application | Specific application | ||
| variable | Certain variable | ||
| value | New value of the variable | ||
extc value getextc value get |
Reading the value of one or more variables | extc value get application "http_proxy" variable "VIRUSSCAN_ENGINE" | |
| application | Specific application | ||
| variable | Certain variable |
Application examples
| Command | Description |
|---|---|
Block IP addresses globallyBlock IP addresses globally | |
| extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } | To block IP addresses globally, they must first be added to the variable ‘'GLOB_BLOCK_ADDRESSES’'. An array of IP addresses (separated by spaces) can be transferred using the ‘'value’' parameter. |
| extc global get | This command can be used to check the current value of the variable. |
| rule implied rule set implied_group 17 implied_rule 0 active 1 rule implied rule set implied_group 17 implied_rule 1 active 1 |
The implicit rules that activate the blocking of IP addresses from the list must also be activated. |


