Controlling the surge protector esg (bannedaddrs)
Overview
Provides access to the Edge Network Filter operational data of all role instances esg.
Automatic blocking of an IP address occurs when SIP-requests with incorrect authorization data are repeatedly received from it within a limited time interval. Automatic locking is done on a specific instance of the role esg. Those added to the list via the API are placed on the banned address lists on all available instances of the role esg.
Displays all blocked IP addresses and blocking times - both those automatically blocked and those added by the master domain administrator. It also allows you to work with the list of blocked IP addresses: add, delete, clear.
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
Getting the list of esg role instances and blocked IP addresses |
|
|
|
|
|
General scoping parameters of requests
The given parameters are used in the URL (?param=value
) to restrict the scoping of the request (the composition of role instances to which the request applies).
All are optional and may not be available.
It makes sense to specify no more than one of these, or to specify none.
Name | Type | Description |
---|---|---|
|
|
The site name from the configuration. For example |
|
|
A comma-separated list of site names. For example |
|
|
Server alias. Can be the IP address, number or full name of the server from configuration. For example |
|
|
A comma-separated list of server aliases. For example |
Adding an IP address to blocked lists
Adds an arbitrary IP address to the role’s banned IP address lists esg.
The query is parallelized for execution on all instances of the esg role included in the skope specified by parameters in the URL.
Request
URL may contain additional scope-parameters.
Name | Type | Description |
---|---|---|
|
|
IPV4-address to be blocked. |
|
|
The time interval in seconds after which the address should be automatically deleted. Each subsequent request for the specified address extends the auto-delete timer. |
POST /rest/v1/master/logicalroles/esg/bannedaddrs?site=SITE1 HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"ip": "212.54.68.68",
"expires": "600"
}
Response
Contains a list of object representations of all instances of the esg role included in the query scope. Each object contains the status and result of the query execution.
Name | Description |
---|---|
|
The name of the site where the current role instance is located esg. |
|
The name of the node on which the current role instance is executed esg. |
|
The server number from the configuration on which the node with the current role instance is running esg |
|
The address of the server from the configuration on which the node with the current role instance is running esg |
|
An indication of the activity/availability of the role instance from the web server serving the request.
|
|
For active and available instances, specifies the result of the operation.
|
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"site": "SITE1",
"node": "site1_h11@192.168.0.12",
"srvidx": 120,
"addr": "192.168.0.12",
"online": true,
"result": true
},
{
"site": "SITE1",
"node": "site1_h1@192.168.0.15",
"srvidx": 150,
"addr": "192.168.0.15",
"online": true,
"result": true
}
]
Getting the list of esg role instances and blocked IP addresses
Returns a list of object-representations of all instances of role esg included in the query scope specified by scope-parameters in the URL.
Each object contains the status of a role instance and a list of blocked IP addresses on that role instance if it is active and available.
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
URL may contain additional scope-parameters.
GET /rest/v1/master/master/logicalroles/esg/bannedaddrs?site=SITE1,mask=banned,node,online&limit=2 HTTP/1.1
Response
Contains a list of objects, each representing a specific instance of the esg role included in the request skope.
Name | Description |
---|---|
|
The name of the site where the current role instance is located esg. |
|
The name of the node on which the current role instance is executed esg. |
|
The server number from the configuration on which the node with the current role instance is running esg |
|
The address of the server from the configuration on which the node with the current role instance is running esg |
|
An indication of the activity/availability of the role instance from the web server serving the request.
|
|
List of blocked IP addresses. Each address in the list is represented by an object with fields:
|
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"node": "site1_h11@192.168.0.12",
"online": true,
"banned": [
{
"ip": "212.54.68.68",
"expires": 526
},
{
"ip": "187.13.93.27",
"expires": 277
}
]
},
{
"node": "site1_h1@192.168.0.15",
"online": true,
"banned": [
{
"ip": "212.54.68.68",
"expires": 526
}
]
}
]
Clearing lists of blocked addresses
Clears lists of blocked IP addresses of a role esg.
The query is parallelized and applied to all role instances of esg included in the scope specified by scope-parameters in the URL.
Request
URL may contain additional scope-parameters.
DELETE /rest/v1/master/logicalroles/esg/bannedaddrs HTTP/1.1
Remove an address from the list of blocked addresses
Removes the blocked IP address from the list of blocked IP addresses of the role esg.
The query is parallelized and applied to all role instances of esg included in the scope specified by scope-parameters in the URL.
Request
URL may contain additional scope-parameters.
DELETE /rest/v1/master/logicalroles/esg/bannedaddrs/212.54.68.68 HTTP/1.1