Skip to main content

firewall_rules

Creates, updates, deletes, gets or lists a firewall_rules resource.

Overview

Namefirewall_rules
TypeResource
Idlinode.networking.firewall_rules

Fields

The following fields are returned by SELECT queries:

The requested Firewall Rules.

NameDatatypeDescription
fingerprintstringRead-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)
inboundarrayThe inbound rules for the firewall, as a JSON array. (x-linode-cli-format: json)
inbound_policystringThe default behavior for inbound traffic. This setting can be overridden by updating the inbound.action property of the Firewall Rule. (example: DROP)
outboundarrayThe outbound rules for the firewall, as a JSON array. (x-linode-cli-format: json)
outbound_policystringThe default behavior for outbound traffic. This setting can be overridden by updating the outbound.action property of the Firewall Rule. (example: DROP)
versionintegerRead-only The firewall's rule version. The first version is 1. The version number is incremented when the firewall's rules change.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_firewall_rulesselectReturns the inbound and outbound Rules for a Firewall.

Learn more...

Learn more...
put_firewall_rulesreplaceUpdates 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.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Returns the inbound and outbound Rules for a Firewall.

Learn more...

Learn more...

SELECT
fingerprint,
inbound,
inbound_policy,
outbound,
outbound_policy,
version
FROM linode.networking.firewall_rules;

REPLACE examples

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.

Learn more...

Learn more...

REPLACE linode.networking.firewall_rules
SET
data__inbound = '{{ inbound }}',
data__inbound_policy = '{{ inbound_policy }}',
data__outbound = '{{ outbound }}',
data__outbound_policy = '{{ outbound_policy }}'
WHERE

RETURNING
fingerprint,
inbound,
inbound_policy,
outbound,
outbound_policy,
version;