---
updatedAt: 2026-06-18T19:49:53.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/linode-api/llms.txt
---

# Update a Linode's firewalls

Replace the current list of assigned firewalls with a new list, or provide an empty list to remove all firewalls from this Linode.


**Permissions and scopes**

To call this operation, you need the following:

- **Identity and access permissions**. Your user needs a role with these permissions assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).
  - Permissions: `update_linode_firewalls`
- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).

  - Scopes: `linodes:read_write`


**CLI**

```shell
linode-cli linodes firewalls-update 123 \
  --firewall_ids '[1234]'
```

[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

# OpenAPI definition

````json
{
  "components": {
    "securitySchemes": {
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.linode.com/oauth/authorize",
            "scopes": {
              "account:read_only": "Allows access to GET information about your account.",
              "account:read_write": "Allows access to all endpoints related to your account.",
              "child_account:read_only": "Allows access to GET information about deprecated parent/child operations.",
              "child_account:read_write": "Allows access to deprecated parent/child operations.",
              "databases:read_only": "Allows access to GET information about databases.",
              "databases:read_write": "Allows access to all endpoints related to databases.",
              "domains:read_only": "Allows access to GET Domains on your account.",
              "domains:read_write": "Allows access to all Domain endpoints.",
              "events:read_only": "Allows access to GET your Events.",
              "events:read_write": "Allows access to all endpoints related to your Events.",
              "firewall:read_only": "Allows access to GET information about your Firewalls.",
              "firewall:read_write": "Allows access to all Firewall endpoints.",
              "images:read_only": "Allows access to GET your Images.",
              "images:read_write": "Allows access to all endpoints related to your Images.",
              "ips:read_only": "Allows access to GET your ips.",
              "ips:read_write": "Allows access to all endpoints related to your ips.",
              "linodes:read_only": "Allows access to GET Linodes on your account.",
              "linodes:read_write": "Allow access to all endpoints related to your Linodes.",
              "lke:read_only": "Allows access to GET LKE Clusters on your account.",
              "lke:read_write": "Allows access to all endpoints related to LKE Clusters on your account.",
              "longview:read_only": "Allows access to GET your Longview Clients.",
              "longview:read_write": "Allows access to all endpoints related to your Longview Clients.",
              "monitor:read_only": "Allows access to Monitor (Akamai Cloud Pulse) data.",
              "monitor:read_write": "Allows access to GET Monitor (Akamai Cloud Pulse) data.",
              "natgateways:read_only": "Allows access to Get NAT Gateways on your account.",
              "natgateways:read_write": "Allows access to all NAT Gateway endpoints.",
              "nodebalancers:read_only": "Allows access to GET NodeBalancers on your account.",
              "nodebalancers:read_write": "Allows access to all NodeBalancer endpoints.",
              "object_storage:read_only": "Allows access to GET information related to your Object Storage.",
              "object_storage:read_write": "Allows access to all Object Storage endpoints.",
              "stackscripts:read_only": "Allows access to GET your StackScripts.",
              "stackscripts:read_write": "Allows access to all endpoints related to your StackScripts.",
              "volumes:read_only": "Allows access to GET your Volumes.",
              "volumes:read_write": "Allows access to all endpoints related to your Volumes.",
              "vpc:read_only": "Allows access to GET information for VPCs.",
              "vpc:read_write": "Allows access to all endpoints related to VPC and Subnet creation, updating, and deletion."
            },
            "tokenUrl": "https://login.linode.com/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "personalAccessToken": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "See documentation for Akamai's Linode API",
    "url": "https://techdocs.akamai.com/linode-api/reference"
  },
  "info": {
    "description": "\"[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).\"",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Linode instances",
    "version": "4.229.1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/{apiVersion}/linode/instances/{linodeId}/firewalls": {
      "put": {
        "description": "Replace the current list of assigned firewalls with a new list, or provide an empty list to remove all firewalls from this Linode.\n\n\n**Permissions and scopes**\n\nTo call this operation, you need the following:\n\n- **Identity and access permissions**. Your user needs a role with these permissions assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).\n  - Permissions: `update_linode_firewalls`\n- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).\n\n  - Scopes: `linodes:read_write`\n\n\n**CLI**\n\n```shell\nlinode-cli linodes firewalls-update 123 \\\n  --firewall_ids '[1234]'\n```\n\n[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Linode API",
          "url": "https://techdocs.akamai.com/linode-api/reference/put-linode-firewalls"
        },
        "operationId": "put-linode-firewalls",
        "parameters": [
          {
            "description": "The page of a collection to return.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "example": 6,
              "minimum": 1,
              "type": "integer"
            },
            "x-akamai": {
              "file-path": "parameters/page-offset.yaml"
            }
          },
          {
            "description": "The number of items to return per page.",
            "in": "query",
            "name": "page_size",
            "schema": {
              "default": 100,
              "example": 50,
              "maximum": 500,
              "minimum": 25,
              "type": "integer"
            },
            "x-akamai": {
              "file-path": "parameters/page-size.yaml"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "firewall_ids": [
                  1234,
                  6789
                ]
              },
              "schema": {
                "additionalProperties": false,
                "description": "Replace or remove firewalls IDs assigned to a Linode or NodeBalancer.",
                "properties": {
                  "firewall_ids": {
                    "description": "A complete list of firewall IDs to assign to this Linode or NodeBalancer. This operation replaces any existing assignments. To remove all firewalls, pass an empty list, `[]`.",
                    "example": [
                      1,
                      2
                    ],
                    "items": {
                      "type": "integer"
                    },
                    "minItems": 0,
                    "type": "array"
                  }
                },
                "required": [
                  "firewall_ids"
                ],
                "type": "object",
                "x-akamai": {
                  "file-path": "schemas/firewall-ids-request.yaml"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "created": "2026-01-01T00:01:01",
                      "entities": [
                        {
                          "id": 123,
                          "label": "my-linode",
                          "parent_entity": {
                            "id": 5000,
                            "label": "linode5000",
                            "parent_entity": null,
                            "type": "linode",
                            "url": "/v4/linode/instances/5000"
                          },
                          "type": "linode_interface",
                          "url": "/v4/linode/instances/123"
                        }
                      ],
                      "id": 123,
                      "label": "firewall123",
                      "rules": {
                        "fingerprint": "997dd135",
                        "inbound": [
                          {
                            "action": "ACCEPT",
                            "addresses": {
                              "ipv4": [
                                "192.0.2.0/24",
                                "198.51.100.2/32"
                              ],
                              "ipv6": [
                                "2001:DB8::/128"
                              ]
                            },
                            "description": "An example firewall rule description.",
                            "label": "firewallrule123",
                            "ports": "22-24, 80, 443",
                            "protocol": "TCP"
                          }
                        ],
                        "inbound_policy": "DROP",
                        "outbound": [
                          {
                            "action": "DROP",
                            "addresses": {
                              "ipv4": [
                                "198.51.100.0/24"
                              ]
                            },
                            "description": "Drop all traffic to untrusted range",
                            "label": "drop-all",
                            "protocol": "ALL"
                          }
                        ],
                        "outbound_policy": "ACCEPT",
                        "version": 1
                      },
                      "status": "enabled",
                      "tags": [
                        "example tag",
                        "another example"
                      ],
                      "updated": "2026-01-02T00:01:01"
                    }
                  ],
                  "page": 1,
                  "pages": 1,
                  "results": 1
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "description": "A list of firewalls for the Linode.",
                      "items": {
                        "additionalProperties": false,
                        "description": "A resource that controls incoming and outgoing network traffic to a compute service. Only one enabled Firewall can be attached to a particular service at any given time. [Create a firewall device](ref:post-firewall-device) to assign a Firewall to a service. Currently, Firewalls can assigned to Linode compute instances and NodeBalancers.",
                        "properties": {
                          "created": {
                            "description": "__Filterable__, __Read-only__ When this Firewall was created.",
                            "example": "2025-01-01T00:01:01",
                            "readOnly": true,
                            "type": "string",
                            "x-akamai": {
                              "labels": [
                                "Filterable"
                              ]
                            },
                            "x-linode-cli-display": 4,
                            "x-linode-filterable": true
                          },
                          "entities": {
                            "description": "__Read-only__ The Linodes, NodeBalancers, and Linode interfaces this firewall is assigned to.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "description": "The entity's ID.",
                                  "example": 123,
                                  "type": "integer"
                                },
                                "label": {
                                  "description": "__Read-only__ The entity's label.",
                                  "example": "my-linode",
                                  "nullable": true,
                                  "readOnly": true,
                                  "type": "string"
                                },
                                "parent_entity": {
                                  "additionalProperties": false,
                                  "description": "__Read-only__ The Linode this `linode_interface` is assigned to. Returns `null` when the entity `type` is `linode` or `nodebalancer`.",
                                  "nullable": true,
                                  "properties": {
                                    "id": {
                                      "description": "The ID of the Linode assigned to this `linode_interface`.",
                                      "example": 5000,
                                      "type": "integer"
                                    },
                                    "label": {
                                      "description": "The name of the Linode this `linode_interface` is assigned to.",
                                      "example": "linode5000",
                                      "type": "string"
                                    },
                                    "parent_entity": {
                                      "description": "__Read-only__ Currently, no parent entity has a parent of its own. Each `parent_entity` will have its own `parent_entity` set to `null`.",
                                      "example": null,
                                      "nullable": true,
                                      "readOnly": true,
                                      "type": "string"
                                    },
                                    "type": {
                                      "description": "A Linode interface’s `parent_entity` is a `linode`.",
                                      "enum": [
                                        "linode"
                                      ],
                                      "example": "linode",
                                      "type": "string"
                                    },
                                    "url": {
                                      "description": "The API URL path you can use to access this entity.",
                                      "example": "/v4/linode/instances/5000",
                                      "format": "uri-reference",
                                      "type": "string"
                                    }
                                  },
                                  "readOnly": true,
                                  "type": "object"
                                },
                                "type": {
                                  "description": "The entity's type:\n\n- `linode`: A Linode compute instance.\n- `linode_interface`: A network Linode interface attached to a Linode compute instance.\n- `nodebalancer`: A NodeBalancer service.",
                                  "enum": [
                                    "linode",
                                    "linode_interface",
                                    "nodebalancer"
                                  ],
                                  "example": "linode_interface",
                                  "type": "string"
                                },
                                "url": {
                                  "description": "__Read-only__ The API URL path you can use to access this entity.",
                                  "example": "/v4/linode/instances/123",
                                  "format": "uri-reference",
                                  "readOnly": true,
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "readOnly": true,
                            "type": "array"
                          },
                          "id": {
                            "description": "__Filterable__, __Read-only__ The Firewall's unique ID.",
                            "example": 123,
                            "readOnly": true,
                            "type": "integer",
                            "x-akamai": {
                              "labels": [
                                "Filterable"
                              ]
                            },
                            "x-linode-cli-display": 1,
                            "x-linode-filterable": true
                          },
                          "label": {
                            "description": "__Filterable__ The Firewall's label, for display purposes only.\n\nFirewall labels have the following constraints:\n\n  - Must begin and end with an alphanumeric character.\n  - May only consist of alphanumeric characters, hyphens (`-`), underscores (`_`) or periods (`.`).\n  - Cannot have two hyphens (`--`), underscores (`__`) or periods (`..`) in a row.\n  - Must be between 3 and 32 characters.\n  - Must be unique.",
                            "example": "firewall123",
                            "maxLength": 32,
                            "minLength": 3,
                            "pattern": "^[a-zA-Z]((?!--|__|\\.\\.)[a-zA-Z0-9-_.])+$",
                            "type": "string",
                            "x-akamai": {
                              "labels": [
                                "Filterable"
                              ]
                            },
                            "x-linode-cli-display": 2,
                            "x-linode-filterable": true
                          },
                          "rules": {
                            "additionalProperties": false,
                            "description": "The inbound and outbound access rules to apply to the Firewall.\n\nA Firewall may have up to 25 rules across its inbound and outbound rulesets.\n\nMultiple 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.",
                            "properties": {
                              "fingerprint": {
                                "description": "__Read-only__ The fingerprint is a 32-bit hash. It represents the firewall rules as an 8 character hex string. You can use `fingerprint` to compare rule versions.",
                                "example": "997dd135",
                                "readOnly": true,
                                "type": "string"
                              },
                              "inbound": {
                                "description": "The inbound rules for the firewall, as a JSON array.",
                                "items": {
                                  "additionalProperties": false,
                                  "description": "One of a firewall's inbound or outbound access rules. The `ports` field can be used to allow traffic on a comma-separated list of different ports.",
                                  "properties": {
                                    "action": {
                                      "description": "Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's `inbound_policy` if this is an inbound rule, or the `outbound_policy` if this is an outbound rule:\n\n- `ACCEPT`: Allows matching network traffic through the firewall.\n- `DROP`: Discards matching network traffic.",
                                      "enum": [
                                        "ACCEPT",
                                        "DROP"
                                      ],
                                      "example": "ACCEPT",
                                      "type": "string",
                                      "x-linode-cli-display": 2
                                    },
                                    "addresses": {
                                      "additionalProperties": false,
                                      "description": "The IPv4 or IPv6 addresses affected by this rule. A rule can have up to 255 total addresses or networks listed across its `ipv4` and `ipv6` arrays. A network and a single IP are treated as equivalent when accounting for this limit.\n\nMust contain `ipv4`, `ipv6`, or both.",
                                      "properties": {
                                        "ipv4": {
                                          "description": "A list of IPv4 addresses or networks. Addresses must be in IP/mask format. Must not be an empty list.\n\nIf `0.0.0.0/0` is included in this list, all IPv4 addresses are affected by this rule.",
                                          "example": [
                                            "192.0.2.0/24",
                                            "198.51.100.2/32"
                                          ],
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-linode-cli-display": 5
                                        },
                                        "ipv6": {
                                          "description": "A list of IPv6 addresses or networks. Addresses must be in IP/mask format and must not include zone_id notation as described in [RFC 4007](https://www.rfc-editor.org/rfc/rfc4007). Must not be an empty list.\n\nIf `::/0` is included in this list, all IPv6 addresses are affected by this rule.",
                                          "example": [
                                            "2001:DB8::/128"
                                          ],
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-linode-cli-display": 6
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "description": {
                                      "description": "Used to describe this rule. For display purposes only.",
                                      "example": "An example firewall rule description.",
                                      "maxLength": 100,
                                      "minLength": 1,
                                      "type": "string",
                                      "x-linode-cli-display": 7
                                    },
                                    "label": {
                                      "description": "Used to identify this rule. For display purposes only.",
                                      "example": "firewallrule123",
                                      "maxLength": 32,
                                      "minLength": 3,
                                      "type": "string",
                                      "x-linode-cli-display": 1
                                    },
                                    "ports": {
                                      "description": "A string representing any ports affected by this rule:\n\n- May be a single port, a range of ports, or a comma-separated list of both.\n    - A single space is permitted after each comma.\n    - Ranges are inclusive, for example `22-24`. The end value must be greater than the start value.\n    - Ports must be between `1` and `65535` and can't contain leading zeros, for example, `80` is valid, `080` is not.\n- The string can contain up to 15 \"pieces\". A single port counts as one piece; a range counts as two pieces. for example, `22-24, 80, 443` contains four pieces.\n- Only allowed when protocol is `TCP`, `UDP`, or `SCTP`.\n    - Must be omitted for `ICMP` or `IPENCAP`.\n    - An empty string `\"\"` is only permitted for protocols that support ports.\n- If the `ports` field is omitted for a supported protocol, the rule affects all ports.\n- Only allowed when protocol is `TCP`, `UDP`, or `SCTP`, or their IANA numeric equivalents; `6`, `17`, `132`.\n    - Must be omitted for `ICMP`, `IPENCAP`, `ALL`, or any other numeric protocol.\n    - An empty string `\"\"` is only permitted for protocols that support ports.",
                                      "example": "22-24, 80, 443",
                                      "nullable": true,
                                      "type": "string",
                                      "x-linode-cli-display": 4
                                    },
                                    "protocol": {
                                      "description": "The type of network traffic affected by this rule.\n\nAccepts a limited set of standard protocol keywords including `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL` or any IANA-assigned protocol number as a decimal string including `\"0\"` to `\"255\"`.\n\nIf the protocol keyword you need is not `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL`, use the IANA protocol number option.\n\n`ALL` matches all IP protocols and allows a single rule to unconditionally allow or drop traffic. Rules using `ALL` or IANA numeric protocols other than `\"6\"`, `\"17\"`, or `\"132\"` must not include a `ports` field.",
                                      "example": "TCP",
                                      "oneOf": [
                                        {
                                          "description": "Use a keyword to specify common protocol.\n\nIf the protocol keyword you need is not `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL`, use the **IANA protocol number** option. `ALL` matches all IP protocols and allows a single rule to unconditionally allow or drop traffic. Rules using `ALL`, `ICMP` and `IPENCAP` must not include a `ports` field.",
                                          "enum": [
                                            "TCP",
                                            "UDP",
                                            "ICMP",
                                            "IPENCAP",
                                            "ALL"
                                          ],
                                          "example": "TCP",
                                          "title": "Protocol name",
                                          "type": "string"
                                        },
                                        {
                                          "description": "A decimal string representation of an IANA-assigned IP protocol number including \"0\" to \"255\". For example, use `\"50\"` for ESP or `\"51\"` for AH. Numeric protocols other than `\"6\"` (TCP), `\"17\"` (UDP), or `\"132\"` (SCTP) must not include a `ports` field. Leading zeros are not permitted, for example use `\"6\"`, not `\"06\"`.",
                                          "example": "50",
                                          "pattern": "^(0|[1-9][0-9]?|1[0-9]{2}|2[0-4][0-9]|25[0-5])$",
                                          "title": "IANA protocol number",
                                          "type": "string"
                                        }
                                      ],
                                      "type": "string",
                                      "x-linode-cli-display": 3
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "addresses",
                                    "protocol"
                                  ],
                                  "type": "object",
                                  "x-akamai": {
                                    "file-path": "schemas/firewall-rule-config.yaml"
                                  }
                                },
                                "type": "array",
                                "x-linode-cli-format": "json"
                              },
                              "inbound_policy": {
                                "description": "The default behavior for inbound traffic. This setting can be overridden by [updating](ref:put-firewall-rules) the `inbound.action` property of the Firewall Rule.",
                                "enum": [
                                  "ACCEPT",
                                  "DROP"
                                ],
                                "example": "DROP",
                                "type": "string"
                              },
                              "outbound": {
                                "description": "The outbound rules for the firewall, as a JSON array.",
                                "items": {
                                  "additionalProperties": false,
                                  "description": "One of a firewall's inbound or outbound access rules. The `ports` field can be used to allow traffic on a comma-separated list of different ports.",
                                  "properties": {
                                    "action": {
                                      "description": "Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall's `inbound_policy` if this is an inbound rule, or the `outbound_policy` if this is an outbound rule:\n\n- `ACCEPT`: Allows matching network traffic through the firewall.\n- `DROP`: Discards matching network traffic.",
                                      "enum": [
                                        "ACCEPT",
                                        "DROP"
                                      ],
                                      "example": "ACCEPT",
                                      "type": "string",
                                      "x-linode-cli-display": 2
                                    },
                                    "addresses": {
                                      "additionalProperties": false,
                                      "description": "The IPv4 or IPv6 addresses affected by this rule. A rule can have up to 255 total addresses or networks listed across its `ipv4` and `ipv6` arrays. A network and a single IP are treated as equivalent when accounting for this limit.\n\nMust contain `ipv4`, `ipv6`, or both.",
                                      "properties": {
                                        "ipv4": {
                                          "description": "A list of IPv4 addresses or networks. Addresses must be in IP/mask format. Must not be an empty list.\n\nIf `0.0.0.0/0` is included in this list, all IPv4 addresses are affected by this rule.",
                                          "example": [
                                            "192.0.2.0/24",
                                            "198.51.100.2/32"
                                          ],
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-linode-cli-display": 5
                                        },
                                        "ipv6": {
                                          "description": "A list of IPv6 addresses or networks. Addresses must be in IP/mask format and must not include zone_id notation as described in [RFC 4007](https://www.rfc-editor.org/rfc/rfc4007). Must not be an empty list.\n\nIf `::/0` is included in this list, all IPv6 addresses are affected by this rule.",
                                          "example": [
                                            "2001:DB8::/128"
                                          ],
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array",
                                          "x-linode-cli-display": 6
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "description": {
                                      "description": "Used to describe this rule. For display purposes only.",
                                      "example": "An example firewall rule description.",
                                      "maxLength": 100,
                                      "minLength": 1,
                                      "type": "string",
                                      "x-linode-cli-display": 7
                                    },
                                    "label": {
                                      "description": "Used to identify this rule. For display purposes only.",
                                      "example": "firewallrule123",
                                      "maxLength": 32,
                                      "minLength": 3,
                                      "type": "string",
                                      "x-linode-cli-display": 1
                                    },
                                    "ports": {
                                      "description": "A string representing any ports affected by this rule:\n\n- May be a single port, a range of ports, or a comma-separated list of both.\n    - A single space is permitted after each comma.\n    - Ranges are inclusive, for example `22-24`. The end value must be greater than the start value.\n    - Ports must be between `1` and `65535` and can't contain leading zeros, for example, `80` is valid, `080` is not.\n- The string can contain up to 15 \"pieces\". A single port counts as one piece; a range counts as two pieces. for example, `22-24, 80, 443` contains four pieces.\n- Only allowed when protocol is `TCP`, `UDP`, or `SCTP`.\n    - Must be omitted for `ICMP` or `IPENCAP`.\n    - An empty string `\"\"` is only permitted for protocols that support ports.\n- If the `ports` field is omitted for a supported protocol, the rule affects all ports.\n- Only allowed when protocol is `TCP`, `UDP`, or `SCTP`, or their IANA numeric equivalents; `6`, `17`, `132`.\n    - Must be omitted for `ICMP`, `IPENCAP`, `ALL`, or any other numeric protocol.\n    - An empty string `\"\"` is only permitted for protocols that support ports.",
                                      "example": "22-24, 80, 443",
                                      "nullable": true,
                                      "type": "string",
                                      "x-linode-cli-display": 4
                                    },
                                    "protocol": {
                                      "description": "The type of network traffic affected by this rule.\n\nAccepts a limited set of standard protocol keywords including `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL` or any IANA-assigned protocol number as a decimal string including `\"0\"` to `\"255\"`.\n\nIf the protocol keyword you need is not `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL`, use the IANA protocol number option.\n\n`ALL` matches all IP protocols and allows a single rule to unconditionally allow or drop traffic. Rules using `ALL` or IANA numeric protocols other than `\"6\"`, `\"17\"`, or `\"132\"` must not include a `ports` field.",
                                      "example": "TCP",
                                      "oneOf": [
                                        {
                                          "description": "Use a keyword to specify common protocol.\n\nIf the protocol keyword you need is not `TCP` , `UDP`, `ICMP`, `IPENCAP`, or `ALL`, use the **IANA protocol number** option. `ALL` matches all IP protocols and allows a single rule to unconditionally allow or drop traffic. Rules using `ALL`, `ICMP` and `IPENCAP` must not include a `ports` field.",
                                          "enum": [
                                            "TCP",
                                            "UDP",
                                            "ICMP",
                                            "IPENCAP",
                                            "ALL"
                                          ],
                                          "example": "TCP",
                                          "title": "Protocol name",
                                          "type": "string"
                                        },
                                        {
                                          "description": "A decimal string representation of an IANA-assigned IP protocol number including \"0\" to \"255\". For example, use `\"50\"` for ESP or `\"51\"` for AH. Numeric protocols other than `\"6\"` (TCP), `\"17\"` (UDP), or `\"132\"` (SCTP) must not include a `ports` field. Leading zeros are not permitted, for example use `\"6\"`, not `\"06\"`.",
                                          "example": "50",
                                          "pattern": "^(0|[1-9][0-9]?|1[0-9]{2}|2[0-4][0-9]|25[0-5])$",
                                          "title": "IANA protocol number",
                                          "type": "string"
                                        }
                                      ],
                                      "type": "string",
                                      "x-linode-cli-display": 3
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "addresses",
                                    "protocol"
                                  ],
                                  "type": "object",
                                  "x-akamai": {
                                    "file-path": "schemas/firewall-rule-config.yaml"
                                  }
                                },
                                "type": "array",
                                "x-linode-cli-format": "json"
                              },
                              "outbound_policy": {
                                "description": "The default behavior for outbound traffic. This setting can be overridden by [updating](ref:put-firewall-rules) the `outbound.action` property of the Firewall Rule.",
                                "enum": [
                                  "ACCEPT",
                                  "DROP"
                                ],
                                "example": "ACCEPT",
                                "type": "string"
                              },
                              "version": {
                                "description": "__Read-only__ The firewall's rule version. The first version is `1`. The version number is incremented when the firewall's rules change.",
                                "example": 1,
                                "readOnly": true,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "inbound_policy",
                              "outbound_policy"
                            ],
                            "type": "object"
                          },
                          "status": {
                            "description": "__Read-only__ The status of this Firewall.\n\n  - When a Firewall is first created its status is `enabled`.\n  - Run the [Update a firewall](ref:put-firewall) operation to set a Firewall's status to `enabled` or `disabled`.\n  - Run the [Delete a firewall](ref:delete-firewall) operation to delete a Firewall.",
                            "enum": [
                              "enabled",
                              "disabled",
                              "deleted"
                            ],
                            "example": "enabled",
                            "readOnly": true,
                            "type": "string",
                            "x-linode-cli-display": 3
                          },
                          "tags": {
                            "description": "__Filterable__ An array of tags applied to this object. Tags are for organizational purposes only.",
                            "example": [
                              "example tag",
                              "another example"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "type": "array",
                            "x-akamai": {
                              "labels": [
                                "Filterable"
                              ]
                            },
                            "x-linode-filterable": true
                          },
                          "updated": {
                            "description": "__Filterable__, __Read-only__ When this Firewall was last updated.",
                            "example": "2025-01-02T00:01:01",
                            "readOnly": true,
                            "type": "string",
                            "x-akamai": {
                              "labels": [
                                "Filterable"
                              ]
                            },
                            "x-linode-cli-display": 5,
                            "x-linode-filterable": true
                          }
                        },
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/firewall.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "page": {
                      "description": "__Read-only__ The current [page](ref:pagination).",
                      "example": 1,
                      "readOnly": true,
                      "type": "integer"
                    },
                    "pages": {
                      "description": "__Read-only__ The total number of [pages](ref:pagination).",
                      "example": 1,
                      "readOnly": true,
                      "type": "integer"
                    },
                    "results": {
                      "description": "__Read-only__ The total number of results.",
                      "example": 1,
                      "readOnly": true,
                      "type": "integer"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/added-get-linode-firewalls-200.yaml"
                  }
                }
              }
            },
            "description": "Returns a paginated list of Firewalls assigned to this Linode."
          },
          "default": {
            "content": {
              "application/json": {
                "example": {
                  "errors": [
                    {
                      "reason": "Invalid JSON"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "errors": {
                      "description": "Any warnings associated with a response.",
                      "items": {
                        "additionalProperties": false,
                        "description": "An object for describing a single error that occurred during the processing of a request.",
                        "properties": {
                          "field": {
                            "description": "The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as `null` if the error is not specific to any single element of the request.",
                            "example": "fieldname",
                            "type": "string"
                          },
                          "reason": {
                            "description": "What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to [Open a support ticket](ref:post-ticket) or perform some other action before you can complete the request successfully.",
                            "example": "fieldname must be a valid value",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/error-object.yaml"
                        }
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "See [Errors](ref:errors) for the range of possible error response codes."
          }
        },
        "security": [
          {
            "personalAccessToken": []
          },
          {
            "oauth": [
              "linodes:read_write"
            ]
          }
        ],
        "summary": "Update a Linode's firewalls",
        "tags": [
          "Linode firewalls"
        ],
        "x-akamai": {
          "tabs": [
            {
              "syntax": "linode-cli linodes firewalls-update 123 \\\n  --firewall_ids '[1234]'",
              "title": "CLI",
              "url": "https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli"
            }
          ]
        },
        "x-linode-cli-action": "firewalls-update",
        "x-linode-grant": "read_write",
        "x-linode-iam": [
          {
            "permissions": [
              "update_linode_firewalls"
            ]
          }
        ]
      },
      "parameters": [
        {
          "description": "__Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta.",
          "in": "path",
          "name": "apiVersion",
          "required": true,
          "schema": {
            "enum": [
              "v4",
              "v4beta"
            ],
            "example": "v4",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/api-version-path.yaml"
          }
        },
        {
          "description": "The ID of the Linode.",
          "in": "path",
          "name": "linodeId",
          "required": true,
          "schema": {
            "example": 234,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/linode-id-path-177e235a.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/linode-firewalls.yaml",
        "path-info": "/{apiVersion}/linode/instances/{linodeId}/firewalls"
      },
      "x-linode-cli-command": "linodes"
    }
  },
  "servers": [
    {
      "url": "https://api.linode.com"
    }
  ],
  "tags": [
    {
      "description": "Use these operations to manage the firewalls applied to your Linodes.",
      "name": "Linode firewalls"
    }
  ],
  "x-akamai": {
    "auth-type": "OAUTH",
    "file-path": "linode-1.yaml"
  },
  "x-readme": {
    "apply-tag-changes": true,
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
````

# Sibling pages

* [List a Linode's firewalls](https://techdocs.akamai.com/linode-api/reference/get-linode-firewalls.md)
* [Apply a Linode's firewalls](https://techdocs.akamai.com/linode-api/reference/post-apply-firewalls.md)