POST /firewalls/{id}/actions/set_rules

Set the rules of a Firewall.

Overwrites the existing rules with the given ones. Pass an empty array to remove all rules.

Rules are limited to 50 entries per Firewall and 500 effective rules.

Servers

Path parameters

Name Type Required Description
id Integer Yes

ID of the Firewall.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
rules[] Array Yes

Array of rules.

Rules are limited to 50 entries per Firewall and 500 effective rules.

Existing rules will be replaced.

rules[].port String No

Port or port range to apply the rule for.

Only applicable for protocols tcp and udp.

A port range can be specified by separating lower and upper bounds with a dash. 1024-5000 will include all ports starting from 1024 up to port 5000.

rules[].description String No

Description of the rule.

rules[].direction String Yes

Traffic direction in which the rule should be applied to.

Use source_ips for direction in and destination_ips for direction out to specify IPs.

Possible values:

  • "out"
  • "in"
rules[].destination_ips[] Array No

List of permitted IPv4/IPv6 addresses for outgoing traffic.

The direction must be set to out.

IPs must be in CIDR block notation. You can specify 100 CIDR blocks at most.

The CIDR blocks may refer to networks (with empty host bits) or single hosts. For example, a network could be defined with 10.0.1.0/24 or 2001:db8:ff00:42::/64, and a single host with 10.0.1.1/32 or 2001:db8:ff00:42::8329/128.

Use 0.0.0.0/0 to allow any IPv4 addresses and ::/0 to allow any IPv6 addresses.

rules[].protocol String Yes

Network protocol to apply the rule for.

Possible values:

  • "gre"
  • "tcp"
  • "udp"
  • "icmp"
  • "esp"
rules[].source_ips[] Array No

List of permitted IPv4/IPv6 addresses for incoming traffic.

The direction must be set to in.

IPs must be provided in CIDR block notation. You can specify 100 CIDR blocks at most.

The CIDR blocks may refer to networks (with empty host bits) or single hosts. For example, a network could be defined with 10.0.1.0/24 or 2001:db8:ff00:42::/64, and a single host with 10.0.1.1/32 or 2001:db8:ff00:42::8329/128.

Use 0.0.0.0/0 to allow any IPv4 addresses and ::/0 to allow any IPv6 addresses.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.