Die Seite wurde neu angelegt: „{{Set_lang}} {{#vardefine:headerIcon|spicon-utm}} {{:UTM/CLI/Extc.lang}} {{var | neu--Layoutanpassung | Layoutanpassung | }} {{var | neu--Befehle valuelist | Neue Befehle: extc valuelist | }} {{var | neu--Befehle runtimevar | Neue Befehle: extc runtimevar | }} {{var | neu--Befehle template | Neue Befehle: extc template set, extc template getdiff…“ |
KKeine Bearbeitungszusammenfassung |
||
| (3 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 4: | Zeile 4: | ||
{{:UTM/CLI/Extc.lang}} | {{:UTM/CLI/Extc.lang}} | ||
{{var | neu-- | {{var | neu--Abschnitt Anwendungsbeispiele | ||
| | | Neuer Abschnitt: [[#Anwendungsbeispiele|Anwendungsbeispiele]] | ||
| New Section: [[#Application_examples|Application examples]] }} | |||
{{var | neu--Parameter global set | |||
| Neue [[#extc global set|globale Variable]]: ''GLOB_BLOCK_ADDRESSES'' | |||
| New [[#extc global set|global variable]]: ''GLOB_BLOCK_ADDRESSES'' }} | |||
{{var | neu--GLOB_BLOCK_ADDRESSES | |||
| Neue Variable ''GLOB_BLOCK_ADDRESSES'' | |||
| New variable ''GLOB_BLOCK_ADDRESSES'' }} | |||
{{var | neu--Befehle | |||
| Neue Befehle: [[#extc cleanup overview|extc cleanup overview]], [[#extc cleanup execute|extc cleanup execute]], [[#extc valuelist get_with_state|extc valuelist get_with_state]] | |||
| }} | | }} | ||
{{var | neu-- | {{var | neu--Anwendungsbeispiel Invalide Variablen zurücksetzen | ||
| | | Neues Anwendungsbeispiel: [[#Invalide Variablen zurücksetzen|Invalide Variablen zurücksetzen]] | ||
| }} | | }} | ||
</div> | </div>{{Select_lang}}{{TOC2}} | ||
{{Header| | {{Header|14.0.1| | ||
* {{#var:neu-- | <!--* {{#var:neu--Anwendungsbeispiel Invalide Variablen zurücksetzen}}--> | ||
* {{#var:neu--Befehle | * {{#var:neu--Befehle}} | ||
* {{#var:neu-- | * {{#var:neu--Parameter global set}} <small>(v14.0)</small> | ||
* {{#var:neu-- | * {{#var:neu--Abschnitt Anwendungsbeispiele}} <small>(v14.0)</small> | ||
|[[Extc_cli_v11 | v11]] | |[[UTM/CLI/Extc_06.2024 | 06.2024]] | ||
[[Extc_cli_v11 | v11]] | |||
|{{Menu-UTM|Extras|CLI}} | |{{Menu-UTM|Extras|CLI}} | ||
}} | }} | ||
---- | ---- | ||
<br clear=all> | |||
=== {{#var:Befehle allgemein}} === | |||
{| class="sptable2 pd5 zh1 sortable" | {| class="sptable2 pd5 zh1 sortable" | ||
|- | |- | ||
! {{#var:Befehl}} !! class=unsortable| {{#var:Parameter}} !! class=unsortable| {{#var:desc}} !! class=unsortable| {{#var:Beispiel}} | ! {{#var:Befehl}} !! class=unsortable| {{#var:Parameter}} !! class=unsortable| {{#var:desc}} !! class=unsortable| {{#var:Beispiel}} | ||
|- | |||
| rowspan=3 | {{h4|extc cleanup}} {{h5|extc cleanup overview}} '''extc cleanup''' overview {{Hinweis-box|{{#var:neu ab}} v14.0.1|gr|14.0.1|status=neu}} | |||
| | |||
| {{#var:extc cleanup overview--desc}} | |||
| rowspan=3 | {{code|<nowiki>extc cleanup overview [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ]</nowiki>}}<li class="list--element__alert list--element__hint">{{#var:extc valuelist--Hinweis}}</li> | |||
|- | |||
| application | |||
| {{#var:extc-application--desc}} | |||
|- | |||
| variables | |||
| {{#var:extc valuelist-variables--desc}} | |||
|- | |||
| rowspan=3 | {{h5|extc cleanup execute}} extc cleanup execute {{Hinweis-box|{{#var:neu ab}} v14.0.1|gr|14.0.1|status=neu}} | |||
| | |||
| {{#var:extc cleanup execute--desc}} | |||
| rowspan=3 | {{code|<nowiki>extc cleanup execute [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ]</nowiki>}}<li class="list--element__alert list--element__hint">{{#var:extc valuelist--Hinweis}}</li> | |||
|- | |||
| application | |||
| {{#var:extc-application--desc}} | |||
|- | |||
| variables | |||
| {{#var:extc valuelist-variables--desc}} | |||
|- | |||
| rowspan=3 | {{h4|extc valuelist}} {{h5|extc valuelist get_with_state}} '''extc valuelist''' get_with_state {{Hinweis-box|{{#var:neu ab}} v14.0.1|gr|14.0.1|status=neu}} | |||
| | |||
| {{#var:extc valuelist get_with_state--desc}} | |||
| rowspan=3 | {{code|<nowiki>extc valuelist get_with_state [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ]</nowiki>}}<li class="list--element__alert list--element__hint">{{#var:extc valuelist--Hinweis}}</li> | |||
|- | |||
| application | |||
| {{#var:extc-application--desc}} | |||
|- | |- | ||
| | | variables | ||
| {{#var:extc valuelist-variables--desc}} | |||
|- | |||
| rowspan=5 | {{h5|extc valuelist set}} extc valuelist set | |||
| | | | ||
| {{#var:extc valuelist set--desc}} | | {{#var:extc valuelist set--desc}} | ||
| Zeile 50: | Zeile 92: | ||
|- | |- | ||
| rowspan=3 | | | rowspan=3 | {{h5|extc valuelist default}} extc valuelist default | ||
| | | | ||
| {{#var:extc valuelist default--desc}} | | {{#var:extc valuelist default--desc}} | ||
| Zeile 61: | Zeile 103: | ||
| {{#var:extc valuelist-variables--desc}} | | {{#var:extc valuelist-variables--desc}} | ||
|- | |- | ||
| rowspan=3 | | | rowspan=3 | {{h5|extc valuelist get}} extc valuelist get | ||
| | | | ||
| {{#var:extc valuelist get--desc}} | | {{#var:extc valuelist get--desc}} | ||
| Zeile 81: | Zeile 123: | ||
| {{#var:extc template-template--desc}} | | {{#var:extc template-template--desc}} | ||
|- | |- | ||
| rowspan=3 | | | rowspan=3 | {{h5|extc template set}} extc template set | ||
| | | | ||
| {{#var:extc template set--desc}} | | {{#var:extc template set--desc}} | ||
| Zeile 92: | Zeile 134: | ||
| {{#var:extc template set-content--desc}} | | {{#var:extc template set-content--desc}} | ||
|- | |- | ||
| rowspan=2 | | | rowspan=2 | {{h5|extc template getdiff}} extc template getdiff | ||
| | | | ||
| {{#var:extc template getdiff--desc}} | | {{#var:extc template getdiff--desc}} | ||
| Zeile 109: | Zeile 151: | ||
|- | |- | ||
| rowspan=2 | | | rowspan=2 | {{h4|extc runtimevar}} {{h5|extc runtimevar delete}} '''extc runtimevar''' delete | ||
| | | | ||
| {{#var:extc runtimevar delete--desc}} | | {{#var:extc runtimevar delete--desc}} | ||
| Zeile 117: | Zeile 159: | ||
| {{#var:extc-variable--desc}} | | {{#var:extc-variable--desc}} | ||
|- | |- | ||
| rowspan=3 | | | rowspan=3 | {{h5|extc runtimevar set}} extc runtimevar set | ||
| | | | ||
| {{#var:extc runtimevar set--desc}} | | {{#var:extc runtimevar set--desc}} | ||
| Zeile 128: | Zeile 170: | ||
| {{#var:extc new-value--desc}} | | {{#var:extc new-value--desc}} | ||
|- | |- | ||
| | | {{h5|extc runtimevar get}} extc runtimevar get | ||
| | | | ||
| {{#var:extc runtimevar get--desc}} | | {{#var:extc runtimevar get--desc}} | ||
| Zeile 155: | Zeile 197: | ||
| | | | ||
| {{#var:extc global set--desc}} | | {{#var:extc global set--desc}} | ||
| rowspan=3 | {{code|extc global set variable | | rowspan=3 | {{code|extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } }} {{Hinweis-box|{{#var:neu--GLOB_BLOCK_ADDRESSES}}|gr|14.0|status=neu}} {{#var:GLOB_BLOCK_ADDRESSES--desc}} | ||
|- | |- | ||
| variable | | variable | ||
| Zeile 266: | Zeile 308: | ||
| variable | | variable | ||
| {{#var:extc-variable--desc}} | | {{#var:extc-variable--desc}} | ||
|} | |||
---- | |||
=== {{#var:Anwendungsbeispiele}} === | |||
{| class="sptable2 pd5 zh1" | |||
! {{#var:Befehl}} !! {{#var:desc}} | |||
|- | |||
| colspan=2 class=odd | {{h4|{{#var:IP Adressen global blockieren}} }}'''{{#var:IP Adressen global blockieren}}''' | |||
|- | |||
| {{code|extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } }} | |||
| {{#var:IP Adressen global blockieren--desc1}} | |||
|- | |||
| {{code|extc global get}} | |||
| {{#var:IP Adressen global blockieren--desc2}} | |||
|- | |||
| {{code|rule implied rule set implied_group 17 implied_rule 0 active 1}}<br>{{code|rule implied rule set implied_group 17 implied_rule 1 active 1}} | |||
| {{#var:IP Adressen global blockieren--desc3}} | |||
<!-- | |||
|- | |||
| colspan=2 class=odd | {{h4|{{#var:Invalide Variablen zurücksetzen}} }}'''{{#var:Invalide Variablen zurücksetzen}}''' | |||
|- | |||
| {{code|<nowiki>extc cleanup overview [ { } ]</nowiki>}} | |||
| {{#var:Invalide Variablen zurücksetzen--desc1}} | |||
|- | |||
| {{code|<nowiki>extc cleanup execute [ { } ]</nowiki>}} | |||
| {{#var:Invalide Variablen zurücksetzen--desc2}} | |||
--> | |||
|} | |} | ||
Aktuelle Version vom 19. Juni 2025, 11:50 Uhr
Syntax für den CLI-Befehl Extc
Letzte Anpassung zur Version: 14.0.1 (01.2025)
Neu:
- Neue Befehle: extc cleanup overview, extc cleanup execute, extc valuelist get_with_state
- Neue globale Variable: GLOB_BLOCK_ADDRESSES (v14.0)
- Neuer Abschnitt: Anwendungsbeispiele (v14.0)
Dieser Artikel bezieht sich auf eine Beta-Version
Befehle allgemein
| Befehl | Parameter | Beschreibung | Beispiel |
|---|---|---|---|
extc cleanupextc cleanup overviewextc cleanup overview notemptyNeu ab v14.0.1 |
Zeigt alle invaliden Variablen von mehrerer Extc Anwendungen/Variablen an | extc cleanup overview [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Bestimmte Anwendung | ||
| variables | Liste von Variablennamen | ||
extc cleanup executeextc cleanup execute notemptyNeu ab v14.0.1 |
Entfernt invalide Einträge, listet anschließend veränderte Variablen mit neuen (validen) Werten auf | extc cleanup execute [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Bestimmte Anwendung | ||
| variables | Liste von Variablennamen | ||
extc valuelistextc valuelist get_with_stateextc valuelist get_with_state notemptyNeu ab v14.0.1 |
Auslesen mehrerer Extc Anwendungen/Variablen inklusive Informationen über den Status (valid / invalid) | extc valuelist get_with_state [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Bestimmte Anwendung | ||
| variables | Liste von Variablennamen | ||
extc valuelist setextc valuelist set |
Setzen der Werte mehrerer Variablen | 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 | Bestimmte Anwendung | ||
| values | Liste von Wertzuweisungen an bestimmte Variablen | ||
| variable | Bestimmte Variable | ||
| value | Neuer Wert der Variable | ||
extc valuelist defaultextc valuelist default |
Auslesen der Default-Werte mehrerer Extc Anwendungen/Variablen | extc valuelist default [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Bestimmte Anwendung | ||
| variables | Liste von Variablennamen | ||
extc valuelist getextc valuelist get |
Auslesen mehrerer Extc Anwendungen/Variablen | extc valuelist get [ { application "l2tpd" } { application "spauthd" } { variables [ "INTERFACES" "TIMEOUT" ] } ] | |
| application | Bestimmte Anwendung | ||
| variables | Liste von Variablennamen | ||
extc templateextc template editextc template edit |
Editor zum bearbeiten eines Templates | extc template edit template "/etc/mailfilter_template_urlfilter" | |
| template | Dateipfad des Templates auf der UTM | ||
extc template setextc template set |
Setzen des Inhalts eines Templates | extc template set template "/etc/mailfilter_template_urlfilter" content "test" | |
| template | Dateipfad des Templates auf der UTM | ||
| content | Neuer Inhalt des Templates | ||
extc template getdiffextc template getdiff |
Ausgabe eines kompletten Templates und der Änderungen im Vergleich zum Default-Wert | extc template getdiff template "/etc/mailfilter_template_urlfilter" | |
| template | Dateipfad des Templates auf der UTM | ||
extc template getextc template get |
Ausgabe eines kompletten Templates | extc template get template "/etc/mailfilter_template_urlfilter" | |
| template | Dateipfad des Templates auf der UTM | ||
extc runtimevarextc runtimevar deleteextc runtimevar delete |
Löschen einer Laufzeitvariablen | extc runtimevar delete variable "PROVIDER_DNS" | |
| variable | Bestimmte Variable | ||
extc runtimevar setextc runtimevar set |
Setzten eines Wertes einer Laufzeitvariable | extc runtimevar set variable "PROVIDER_DNS" value "192.168.1.253" | |
| variable | Bestimmte Variable | ||
| value | Wert der neuen Variable | ||
extc runtimevar getextc runtimevar get |
Ausgabe aller Laufzeitvariablen | extc runtimevar get | |
extc globalextc global defaultsextc global defaults |
Auflisten aller globalen Variablen mit deren Default-Werten | extc global defaults | |
extc global resetextc global reset |
Setzt den Inhalt einer globalen Variablen auf die Werkseinstellung zurück | extc global reset variable "GLOB_ADMIN_EMAIL" | |
| variable | Bestimmte Variable | ||
extc global getextc global get |
Auflisten aller globalen Variablen | extc global get | |
extc global setextc global set |
Setzen eines Wertes einer globalen Variable | extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } notempty Neue Variable GLOB_BLOCK_ADDRESSES | |
| variable | Bestimmte Variable | ||
| value | Neuer Wert der Variable | ||
extc global newextc global new |
Erstellen einer neuen globalen Variable | extc global new variable "GLOB_NEW_VARIABLE" value "1234567890" | |
| variable | Bestimmte Variable | ||
| value | Wert der neuen Variable | ||
extc deleteextc delete |
Entfernen einer Variablen | extc delete variable "new_variable" application "http_proxy" | |
| variable | Bestimmte Variable | ||
| application | Bestimmte Anwendung | ||
extc newextc new |
Erstellen einer neuen Variable | extc new variable "new_variable" application "http_proxy" value "test" | |
| variable | Name der neuen Variable | ||
| application | Anwendung der Variable | ||
| value | Wert der neuen Variable | ||
extc applicationextc application getextc application get |
Auflisten aller Anwendungen | extc application get | |
extc variableextc variable getextc variable get |
Auslesen der Variablen einer Anwendung | extc variable get application "http_proxy" | |
| application | Bestimmte Anwendung | ||
extc valueextc value defaultextc value default |
Ausgabe der Variablen mit den Werten der Werkseinstellung | Alle Anwendungen: extc value default Bestimmte Anwendung: extc value default application "webserver" | |
| application (optional) | Bestimmte Anwendung | ||
extc value resetextc value reset |
Setzt den Inhalt einer Variablen auf die Werkseinstellung zurück | extc value reset application "cvpn" variable "RDP2VNC_PORT" | |
| application | Bestimmte Anwendung | ||
| variable | Bestimmte Variable | ||
extc value setextc value set |
Setzen eines Wertes einer Variable | extc value set application "http_proxy" variable "VIRUSSCAN_ENGINE" value "csamd" | |
| application | Bestimmte Anwendung | ||
| variable | Bestimmte Variable | ||
| value | Neuer Wert der Variable | ||
extc value getextc value get |
Auslesen eines Wertes einer oder mehrerer Variablen | extc value get application "http_proxy" variable "VIRUSSCAN_ENGINE" | |
| application | Bestimmte Anwendung | ||
| variable | Bestimmte Variable |
Anwendungsbeispiele
| Befehl | Beschreibung |
|---|---|
IP Adressen global blockierenIP Adressen global blockieren | |
| extc global set { variable GLOB_BLOCK_ADDRESSES value [ 203.113.0.113 203.113.0.203 ] } | Um IP-Adressen global zu blockieren, müssen diese zunächst in die Variable GLOB_BLOCK_ADDRESSES hinzugefügt werden. Mithilfe des Parameters value kann ein Array an IP-Adressen (mit Leerzeichen getrennt) übergeben werden. |
| extc global get | Mit diesem Befehl kann der aktuelle Wert der Variable überprüft werden. |
| rule implied rule set implied_group 17 implied_rule 0 active 1 rule implied rule set implied_group 17 implied_rule 1 active 1 |
Außerdem müssen noch die impliziten Regeln aktiviert werden, die das blocken der IP-Adressen aus der Liste aktivieren. |


