CubePathDOCS
DDoS Mitigation

Create Firewall Rule

post/ddos-mitigation/firewall-rules

Create a firewall rule for an IP or network.

If you provide a subnet (for example a /24), a separate rule is created for each individual IP in it.

action is a number of the catalogue: list the available ones, with the protocols each accepts, with GET /ddos-mitigation/firewall-actions.

IPv6: an address (bare or /128) or a prefix of /48 to /128 inside a block you own, stored as ONE rule for the whole prefix (never expanded). Same actions and protocol restrictions as IPv4 and protocols 0, 6, 17 and 58 (ICMPv6, dst_port 0; protocol 1 is stored as 58). For IPv6, a source rate limit (60, 61) and an app authentication count each source /64 as one source. The rule is stored, but it only applies to your IPv6 traffic once a core redirects it to the scrubbers (always-on mitigation, scrubbing_active on the profile). A prefix rule is enforced as a prefix; an exact address rule wins over it.

For actions that take limits (limit_fields in the catalogue, such as 60 and 61), set them in tcp_syn, tcp_ack, tcp_synack, tcp_rst, tcp_fin, tcp_all, udp and icmp.

Autorización

Authorization
Authorization*string

Bearer YOUR_API_TOKEN con un token de API. También vale la cabecera X-API-Key: YOUR_API_TOKEN.

Cuerpo de la petición

Schema for creating a firewall rule.

application/jsonObligatorio
network*string
Rango1 ≤ length ≤ 45
protocol*integer
Rango0 ≤ value ≤ 255
dst_port*integer
Rango0 ≤ value ≤ 65535
action*integer
Rango0 ≤ value
tcp_syn?integer
Rango0 ≤ value ≤ 100000000Por defecto0
tcp_ack?integer
Rango0 ≤ value ≤ 100000000Por defecto0
tcp_synack?integer
Rango0 ≤ value ≤ 100000000Por defecto0
tcp_rst?integer
Rango0 ≤ value ≤ 100000000Por defecto0
tcp_fin?integer
Rango0 ≤ value ≤ 100000000Por defecto0
tcp_all?integer
Rango0 ≤ value ≤ 100000000Por defecto0
udp?integer
Rango0 ≤ value ≤ 100000000Por defecto0
icmp?integer
Rango0 ≤ value ≤ 100000000Por defecto0

Respuestas

Successful Response

application/json

detail*string