Network filter management of the current ws instance (bannedaddrs)
- Overview
- Requests
- Common request scope parameters
- Adding an IP address to the banned IP address list of the current web server instance
- Getting the list of banned IP addresses from the current web server instance
- Clearing banned address lists on the current web server instance
- Removing an address from the banned address list on the current web server instance
Overview
Provides access to runtime data of the border network filter of all instances of the ws role.
Automatic IP address blocking occurs when repeated HTTP-, HTTPS-, WS-, WSS- requests with invalid authorization data are received from it within a limited time interval. Automatic blocking is performed on a specific instance of the ws role. Addresses added to the list via the API are placed in the banned address lists on all available instances of the ws role.
Displays all automatically blocked IP addresses and blocking time. It also allows deleting banned IP addresses: one by one or all at once.
Addresses from which more than 5 unauthorized requests with different credentials arrived in the last 3 minutes are blocked. When activity stops, unblocking is performed after 3-5 minutes.
Data is provided from the current WS microservice instance handling the API request. For operations on all instances use the endpoint 'master/logicalroles/ws/bannedaddrs/site'
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
Adding an IP address to the banned IP address list of the current web server instance |
|
|
Getting the list of banned IP addresses from the current web server instance |
|
|
Clearing banned address lists on the current web server instance |
|
|
Removing an address from the banned address list on the current web server instance |
Common request scope parameters
The parameters below are used in the URL (?param=value) to limit the request application scope (the set of role instances to which the request applies).
All are optional and may be absent.
It makes sense to specify no more than one of them, or none at all.
| Name | Type | Description |
|---|---|---|
|
|
Site name from the configuration. For example |
|
|
Comma-separated list of site names. For example |
|
|
Server alias. Can be an IP address, a number, or a full server name from the configuration. For example |
|
|
Comma-separated list of server aliases. For example |
Adding an IP address to the banned IP address list of the current web server instance
Adds an arbitrary IP address to the banned IP address lists of the ws role.
The request is parallelized for execution on all instances of the ws role within the scope specified by URL parameters.
Request
The URL may contain additional scope parameters.
| Name | Type | Description |
|---|---|---|
|
|
IPv4 address to block. |
|
|
Time interval in seconds after which the address should be automatically removed. Each subsequent request for the specified address extends the auto-removal timer. |
POST /rest/v1/master/logicalroles/ws/bannedaddrs HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"ip": "212.54.68.68",
"expires": "600"
}
Response
Contains a list of representation objects of all instances of the ws role within the request scope. Each object contains the status and result of the request execution.
| Name | Description |
|---|---|
|
Name of the site hosting the current instance of the ws role. |
|
Name of the node running the current instance of the ws role. |
|
Server number from the configuration running the node with the current instance of the ws role |
|
Server address from the configuration running the node with the current instance of the ws role |
|
Activity/availability flag of the role instance from the web server serving the request.
|
|
For active and available instances, indicates the operation result.
|
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"site": "SITE1",
"node": "ws111@192.168.0.112",
"srvidx": 11231,
"addr": "212.54.68.68",
"online": true,
"result": true
}
]
Getting the list of banned IP addresses from the current web server instance
Returns a list of representation objects of all instances of the ws role within the request scope specified by URL scope parameters.
Each object contains the role instance status and the list of banned 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 output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
The URL may contain additional scope parameters.
GET /rest/v1/master/master/logicalroles/ws/bannedaddrs?site=SITE1&mask=banned,node,online&offset=2&limit=2 HTTP/1.1
Response
Contains a list of objects, each representing a specific instance of the ws role within the request scope.
| Name | Description |
|---|---|
|
Name of the site hosting the current instance of the ws role. |
|
Name of the node running the current instance of the ws role. |
|
Server number from the configuration running the node with the current instance of the ws role |
|
Server address from the configuration running the node with the current instance of the ws role |
|
Activity/availability flag of the role instance from the web server serving the request.
|
|
List of banned 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
[
{
"site": "SITE1",
"node": "ws111@192.168.0.111",
"srvidx": 11231,
"addr": "212.54.68.68",
"online": true,
"banned": [
{
"ip": "212.54.68.68",
"expires": 526
},
{
"ip": "187.13.93.27",
"expires": 277
}
]
}
]
Clearing banned address lists on the current web server instance
Clears the banned IP address lists of the ws role.
The request is parallelized and applied to all instances of the ws roles within the scope specified by URL scope parameters.
Request
The URL may contain additional scope parameters.
DELETE /rest/v1/master/logicalroles/ws/bannedaddrs HTTP/1.1
Removing an address from the banned address list on the current web server instance
Removes the banned IP address from the banned IP address list of the ws role.
The request is parallelized and applied to all instances of the ws roles within the scope specified by URL scope parameters.
Request
The URL may contain additional scope parameters.
DELETE /rest/v1/master/logicalroles/ws/bannedaddrs/212.54.68.68 HTTP/1.1