Firmware configuration
Use the local REST API to configure the LR54 device
LR54 User Guide
47
Use the POST method to modify device configuration parameters
and list arrays
Use the POST method to modify device configuration parameters
To modify configuration parameters, use the
POST
method with the
path
and
value
parameters.
$ curl -k -u admin "https://
ip-address
/cgi-
bin/config.cgi/value?path=
path
&value=
new_value
" -X POST
where:
n
path
is the path to the configuration parameter, in dot notation (for example,
ssh.service.enable
).
n
new_value
is the new value for the parameter.
For example, to disable the ssh service using
curl
:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?path=service.ssh.enable&value=false" -X POST
Enter host password for user 'admin':
{ "ok": true }
$
Use the POST method to add items to a list array
To add items to a list array, use the
POST
method with the
path
and
append
parameters. For
example, to add the external firewall zone to the ssh service:
$ curl -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?path=service.ssh.acl.zone&append=true&value=external" -X
POST
Enter host password for user 'admin':
{ "ok": true, "result": "service.ssh.acl.zone.4" }
$
Use the POST method to add objects to a list array
Objects in an array that require one or more underlying values can be set using the
collapsed
URI
parameter. We recommend including the -g option as well, to instruct curl to turn off globbing. The
below example would add a new static route for the WAN interface for the 1.2.4.0/24 destination
network:
$ curl -g -k -u admin "https://192.168.210.1/cgi-
bin/config.cgi/value?path=network.route.static&append=true&collapsed
[dst]=1.2.4.0/24&collapsed[interface]=/network/interface/wan" -X POST
Enter host password for user 'admin':
{ "ok": true, "result": "network.route.static.1" }
$
Use the DELETE method to remove items from a list array
To remove items from a list array, use the
DELETE
method. For example, using
curl
:
$ curl -k -u admin "https://192.168.210.1/cgi-bin/config.cgi/value?path=
path
Содержание TransPort LR54
Страница 1: ...LR54 User Guide Firmware version 22 8 ...
Страница 506: ...Virtual Private Networks VPN OpenVPN LR54 User Guide 506 5 Click Apply to save the configuration and apply the change ...
Страница 628: ...Services Simple Network Management Protocol SNMP LR54 User Guide 628 The SNMP page is displayed 4 Click Download ...
Страница 1050: ...Command line interface Execute a command from the web interface LR54 User Guide 1050 The Admin CLI prompt appears ...
Страница 1095: ...Command line interface Command line reference LR54 User Guide 1095 reboot Reboot the system Parameters None ...