webserver bind

Bind the REST API service to a network interface and port.

User Privileges

Users with the following privileges can perform this command:

>Admin

Syntax

webserver bind -netdevice <netdevice> [-port <port>] [-force] [-restart] [-ipv6]

Argument(s) Shortcut Description
-netdevice <netdevice> -n

Network device that REST API Service is to use for communication.

Valid values: all, eth0, eth1, eth2, eth3, bond0, bond1

Default: all (0.0.0.0 i.e. bound to all IPv4 devices)

-force -f

Force the action without prompting.

-port <port> -p

Network port that REST API service is to use for communication.

Range: 1024 to 65535

NOTE   Using Luna Appliance Software 7.8.5 or older, LunaSH allows you to set a port in the range 80-65535, but setting a port number lower than 1024 prevents sessions from opening. Refer to known issue RAPI-4018.

Default: 8443

-restart -r

Restart the REST API service if parameter is specified. Otherwise, the administrator must restart the REST API service by running service start webserver.

-ipv6 -i Use with webserver bind all to bind all IPv6 devices. This parameter is not required when binding to a specific IPv6 device (eth0, eth1, eth2, or eth3), or a specific bonded device (bond0 or bond1).

Examples

Attempting to bind the REST API service when the service is not enabled

webserver bind -netdevice eth0

Error: The REST API Service is not enabled.
The REST API Service must be enabled in order to execute this command.

Command Result : 65535 (Luna Shell execution)

Binding the REST API service without specifying the -restart option

webserver bind -netdevice eth0 -port 8443

WARNING: This operation will modify REST API Server binding information !!!
Type 'proceed' to continue, or 'quit' to quit now.

> proceed
Proceeding...

You chose not to restart REST API Service now.
The changes will be effective when REST API Service is restarted.
To restart it run: service restart webserver

Command Result : 0 (Success)

Binding the REST API service with the -restart option

lunash:>webserver bind -netdevice eth0 -restart

WARNING: This operation will modify REST API Server binding information !!!

Type 'proceed' to continue, or 'quit' to quit now.

> proceed
Proceeding...

Restarting REST API service...

Command Result : 0 (Success)