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
- https://api.hetzner.cloud/v1
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 A port range can be specified by separating lower and upper bounds with a dash. |
rules[].description |
String | No |
Description of the rule. |
rules[].direction |
String | Yes |
Traffic direction in which the rule should be applied to. Use Possible values:
|
rules[].destination_ips[] |
Array | No |
List of permitted IPv4/IPv6 addresses for outgoing traffic. The 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 Use |
rules[].protocol |
String | Yes |
Network protocol to apply the rule for. Possible values:
|
rules[].source_ips[] |
Array | No |
List of permitted IPv4/IPv6 addresses for incoming traffic. The 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 Use |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.