Border filter rule (borderrule)
Description
Static filtering rule for incoming SIP requests. Used for attack protection by SIP roles located at the border of the deployed «Incoplax» system.
Other SIP roles forcibly filter by sender address, allowing only packets from other internal servers.
The system applies the highest-priority matching rule.
The IP address value can be an IP address (e.g. 192.168.0.10), a subnet mask (e.g. 192.168.0.0/24), or an IP address range (e.g. 172.25.0.50+10).
Incoming messages pass through two verification cycles. First, rules with only a remote-side IP address/mask filter are selected. This check does not require significant resources. Rules with other filters automatically pass messages from the first stage to the second. If a message is not filtered at the first stage, it is allowed into the system, and after parsing, all rules with their filters are applied to the parsed message, including rules with filters on the From header domain, From header username, User-Agent, and so on. This must be considered when forming whitelists where the last-priority rule is to deny all.
Rules with only an IP address/mask filter prohibit placing addresses in the dynamic ban list (exceeding the number of authorization attempts with different credentials within a short interval).
Fields
{
"id": uuid,
"priority": str,
"enabled": int,
"site": str,
"domain": str,
"username": str,
"useragent": str,
"remoteipmask": str,
"action": str,
"opts": {
"title": str,
"comment": str
},
"ext": {
"ct": date,
"lwt": date
}
}
| Specification | Description |
|---|---|
Field: |
Identifier. Can be specified at creation, otherwise generated by the system. |
Field: |
Rule switch |
Field: |
Priority. A lower value means higher priority. |
Field: |
Site where the rule is applied. |
Field: |
Service where the rule is applied. |
Field: |
Sender domain or regular expression. |
Field: |
Username or regular expression. |
Field: |
UserAgent field value in the SIP request or a regular expression. |
Sender IP address mask.
Rules matching the corresponding service and specifying only an IP address filter are used by the system in a special way. Whitelist
Thus, for the dynamic ban list to apply to arbitrary addresses, either:
By default, if none of the existing rules matches, the packet received from the IP address is passed for processing. Further levels of filters then apply, in particular dropping failed responses and the dynamic ban list. |
|
Field: |
|
Field: |
|
Field: |
Arbitrary title |
Field: |
Arbitrary comment |
Value of the maximum allowable message density (messages per second) arriving from a specific IP address covered by the rule with the lowest possible priority. A value of 0 disables the counter and blocking function. A value of -1 or "default" takes, for IP addresses matching the rule filter, the default value from master domain settings. When the anti-spam function is enabled (a non-zero maximum allowable message density is set for the address in relation to the protocol): if the number of messages from the address within a few seconds exceeds the specified density, the address automatically enters a managed ban list for some time, so that further messages from it are ignored. Applicable to facade microservices:
If a rule applies to different service types and sets a maximum density, it makes sense to split the rule by service type so that a different maximum density can be set for different service types. To enable the counter and anti-spam function:
Cluster internal addresses mentioned in server configuration options are excluded from anti-spam tracking regardless of how border filter rules are configured. To soften the blocking trigger criterion, averaging over an interval of several seconds is used. The blocking decision is recorded in the main log of the microservice node. |
|
Field: |
Allows extending the compound with arbitrary keys and values |
Field: |
Object creation time |
Field: |
Time of last modification of the object |
Actions when receiving incoming requests
| Value | Description |
|---|---|
|
Allowed |
|
Denied. Request is ignored without sending a response. |
|
Denied. A rejection response is returned. |
Service types
| Value | Description |
|---|---|
|
Applied only on the web server for HTTP(S) and WS(S) API requests. |
|
Applied only on sg (TCP, UDP, TLS, WS, WSS). |
|
Applied only on esg (TCP, UDP, TLS). |
|
Applied only on autoprovision (TFTP). |
|
Applied on all border SIP services: sg, esg, ap. |
|
Applied on all services listed above. |