IP Commands

ADD ALLOWED IP

The ADD ALLOWED IP command restricts access for the role or user by allowing only some IP addresses. Ranges in CIDR notation like 10.10.10.0/24 can be used. IPv4 and IPv6 addresses are supported.

Syntax

ADD ALLOWED IP ip_address [ROLE role_name] [USER username]

Privileges

USERADMIN

Return

OK string or error value (see SCSP protocol).

Example

> ADD ALLOWED IP 10.10.10.0/24 USER user1
OK

LIST ALLOWED IP

The LIST ALLOWED IP returns a rowset that contains all the IP restrictions associated with a given ROLE and/or USER. If no ROLE/USER is specified, then all the IP restrictions table is returned.

Syntax

LIST ALLOWED IP [ROLE role_name] [USER user_name]

Privileges

USERADMIN

Return

A Rowset with the following columns:

  • address: IP address(es) allowed
  • name: user name or role name
  • type: user or role String

Example

> LIST ALLOWED IP
------------|-------|------|
 address    | name  | type |
------------|-------|------|
192.168.1.1 | user1 | user |
------------|-------|------|

REMOVE ALLOWED IP

The REMOVE ALLOWED IP command permanently removes the ip_address from the list of allowed IPs. You can specify a ROLE and/or a USER to restrict the filter further.

Syntax

REMOVE ALLOWED IP ip_address [ROLE role_name] [USER username]

Privileges

USERADMIN

Return

OK string or error value (see SCSP protocol).

Example

> REMOVE ALLOWED IP 192.168.1.1
OK