Update firewall rules

Updates the inbound and outbound Rules for a Firewall.

  • Assigned Linodes must not have any ongoing live migrations.

  • Note. This operation replaces all of a Firewall's inbound and outbound rulesets with the values specified in your request.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Permissions: update_firewall_rules
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: firewall:read_write

CLI

linode-cli firewalls rules-update 123 \
  --inbound '[{"action":"ACCEPT", "protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128"]}}]' \
  --outbound '[{"action":"DROP","protocol": "TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128`"]}}]'

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

ID of the Firewall to access.

Body Params

The Firewall Rules information to update.

The inbound and outbound access rules to apply to the Firewall.

A Firewall may have up to 25 rules across its inbound and outbound rulesets.

Multiple rules are applied in order. If two rules conflict, the first rule takes precedence. For example, if the first rule accepts inbound traffic from an address, and the second rule drops inbound traffic the same address, the first rule applies and inbound traffic from that address is accepted.

inbound
array of objects

The inbound rules for the firewall, as a JSON array.

inbound
outbound
array of objects

The outbound rules for the firewall, as a JSON array.

outbound
string
enum

The default behavior for inbound traffic. This setting can be overridden by updating the inbound.action property of the Firewall Rule.

Allowed:
string
enum

The default behavior for outbound traffic. This setting can be overridden by updating the outbound.action property of the Firewall Rule.

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json