Create a firewall

Creates a Firewall to filter network traffic.

  • Use the rules property to create inbound and outbound access rules.

  • Use the devices property to assign the Firewall to a service and apply its Rules to the device. Requires read_write user grant to the device. Currently, Firewalls can be assigned to Linode compute instances and NodeBalancers.

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

  • A Firewall can be assigned during Linode creation by utilizing the firewall_id Create a Linode property.

  • A service can have one active, assigned Firewall at a time.

Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service.

  • Firewalls apply to all of a Linode's non-vlan purpose Configuration Profile Interfaces.

  • Assigned Linodes must not have any ongoing live migrations.

  • A firewall_create Event is generated when this operation succeeds.

linode-cli firewalls create \
  --label example-firewall \
  --rules.outbound_policy ACCEPT \
  --rules.inbound_policy DROP \
  --rules.inbound '[{"protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"], "ipv6": ["2001:DB8::/128"]}, "action": "ACCEPT"}]' \
  --rules.outbound '[{"protocol": "TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.0/24", "198.51.100.2/32"],"ipv6": ["2001:DB8::/128"]}, "action": "DROP", "label": "outbound-rule123", "description": "An example outbound rule description."}]'

<https://www.linode.com/docs/products/tools/cli/get-started/>
firewall:read_write

<https://techdocs.akamai.com/linode-api/reference/get-started#oauth>
Language
Authorization
Click Try It! to start a request and see the response here!