Networking
Firewall View
https://api.linode.com/v4/networking/firewalls/{firewallId}
Get a specific Firewall resource by its ID. The Firewall's Devices will not be returned in the response. Instead, use the List Firewall Devices endpoint to review them.
Path Parameters
ID of the Firewall to access.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123
Response Samples
- 200
- default
{
"status": "enabled",
"created": "2018-01-01T00:01:01",
"updated": "2018-01-02T00:01:01",
"id": 1234,
"label": "firewall123",
"tags": [],
"rules": {
"inbound": "",
"outbound": "",
"inbound_policy": "DROP",
"outbound_policy": "DROP"
}
}
Responses
200: Returns information about this Firewall.
The status of this Firewall.
- When a Firewall is first created its status is
enabled
. - Use the Update Firewall endpoint to set a Firewall's status to
enabled
ordisabled
. - Use the Delete Firewall endpoint to delete a Firewall.
When this Firewall was created.
When this Firewall was last updated.
The Firewall's unique ID.
The Firewall's label, for display purposes only.
Firewall labels have the following constraints:
- Must begin and end with an alphanumeric character.
- May only consist of alphanumeric characters, dashes (
-
), underscores (_
) or periods (.
). - Cannot have two dashes (
--
), underscores (__
) or periods (..
) in a row. - Must be between 3 and 32 characters.
- Must be unique.
An array of tags applied to this object. Tags are for organizational purposes only.
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.
The inbound rules for the firewall, as a JSON array.
The outbound rules for the firewall, as a JSON array.
The default behavior for inbound traffic. This setting can be overridden by updating the inbound.action
property of the Firewall Rule.
The default behavior for outbound traffic. This setting can be overridden by updating the outbound.action
property of the Firewall Rule.
default: Error
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 or perform some other action before you can complete the request successfully.
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.
Firewall Update
https://api.linode.com/v4/networking/firewalls/{firewallId}
Updates information for a Firewall. Some parts of a Firewall's configuration cannot be manipulated by this endpoint:
A Firewall's Devices cannot be set with this endpoint. Instead, use the Create Firewall Device and Delete Firewall Device endpoints to assign and remove this Firewall from Linode services.
A Firewall's Rules cannot be changed with this endpoint. Instead, use the Update Firewall Rules endpoint to update your Rules.
A Firewall's status can be set to
enabled
ordisabled
by this endpoint, but it cannot be set todeleted
. Instead, use the Delete Firewall endpoint to delete a Firewall.
If a Firewall's status is changed with this endpoint, a corresponding firewall_enable
or
firewall_disable
Event will be generated.
Path Parameters
ID of the Firewall to access.
Request Body Schema
The Firewall's label, for display purposes only.
Firewall labels have the following constraints:
- Must begin and end with an alphanumeric character.
- May only consist of alphanumeric characters, dashes (
-
), underscores (_
) or periods (.
). - Cannot have two dashes (
--
), underscores (__
) or periods (..
) in a row. - Must be between 3 and 32 characters.
- Must be unique.
The status to be applied to this Firewall.
- When a Firewall is first created its status is
enabled
. - Use the Delete Firewall endpoint to delete a Firewall.
An array of tags applied to this object. Tags are for organizational purposes only.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"status": "disabled"
}' \
https://api.linode.com/v4/networking/firewalls/123
Response Samples
- 200
- default
{
"id": 1234,
"label": "firewall123",
"status": "enabled",
"created": "2018-01-01T00:01:01",
"updated": "2018-01-02T00:01:01",
"tags": [],
"rules": {
"inbound": "",
"outbound": "",
"inbound_policy": "DROP",
"outbound_policy": "DROP"
}
}
Responses
200: Firewall updated successfully.
The Firewall's label, for display purposes only.
Firewall labels have the following constraints:
- Must begin and end with an alphanumeric character.
- May only consist of alphanumeric characters, dashes (
-
), underscores (_
) or periods (.
). - Cannot have two dashes (
--
), underscores (__
) or periods (..
) in a row. - Must be between 3 and 32 characters.
- Must be unique.
The status to be applied to this Firewall.
- When a Firewall is first created its status is
enabled
. - Use the Delete Firewall endpoint to delete a Firewall.
An array of tags applied to this object. Tags are for organizational purposes only.
default: Error
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 or perform some other action before you can complete the request successfully.
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.
Firewall Delete
https://api.linode.com/v4/networking/firewalls/{firewallId}
Delete a Firewall resource by its ID. This will remove all of the Firewall's Rules from any Linode services that the Firewall was assigned to.
A firewall_delete
Event is generated when this endpoint returns successfully.
Path Parameters
ID of the Firewall to access.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/networking/firewalls/123
Response Samples
- 200
- default
{}
Responses
200: Delete Successful.
default: Error
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 or perform some other action before you can complete the request successfully.
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.