Create a firewall device

Creates a firewall device, which assigns a firewall to a service (referred to as the device's entity) and applies the firewall's rules to the device.

  • Currently, devices with linode, linode_interface, and nodebalancer entity types are accepted.

    • The linode type is not allowed for Linodes using Linode interfaces.
    • The linode_interface type is not allowed for legacy config interfaces. For VPC and public legacy config profile interfaces, the firewall is applied through the linode device.
    • The linode_interface type only supports regular Linode interfaces, (public or VPC Linode interfaces).
  • Firewalls only apply to inbound TCP traffic to NodeBalancers.

  • A firewall can be assigned to multiple services at a time.

  • A service can have one assigned firewall at a time.

  • Assigned Linodes must not have any ongoing live migrations.

  • A firewall_device_add event is generated when the firewall device is added successfully.

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: create_firewall_device
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: firewall:read_write

CLI

linode-cli firewalls device-create 123 \
  --id 456 \
  --type "linode"

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 Linode, NodeBalancer, or Linode interface this firewall is assigned to.

integer
required

The entity's ID.

string
enum
required

The entity's type.

Allowed:
Responses

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