Networking v4.96.0
Firewalls List
Returns a paginated list of your Firewalls.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_only |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls
linode-cli firewalls list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"id": 123,
"label": "firewall123",
"rules": {
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
},
"status": "enabled",
"tags": [
"example tag",
"another example"
],
"updated": "2018-01-02T00:01:01"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer |
errors | array of objects
|
Firewall Create
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 Linode service. Currently, Firewalls can only be assigned to Linode
instances.
A Firewall can be assigned to a single Linode service at a time.
A firewall_create Event is generated when this endpoint returns successfully.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.notice will be removed when this endpoint is out of beta.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Request Body Schema
devices | objectA Firewall Device assigns a Firewall to a Linode service. Currently, Firewalls can only be assigned to Linode instances.
Note: When a Firewall is assigned to a Linode and you attempt to migrate the Linode to a data center that does not support Cloud Firewalls, the migration will fail. Use the List Regions endpoint to view a list of a data center’s capabilities.
| ||||||||||||||||||||||||||||||||||||||||
label Filterable Required | string
3..32
charactersThe Firewall’s label, for display purposes only. Firewall labels have the following constraints:
| ||||||||||||||||||||||||||||||||||||||||
rules Required | objectThe inbound and outbound access rules to apply to the Firewall. A Firewall may have up to 25 rules across its inbound and outbound rulesets.
| ||||||||||||||||||||||||||||||||||||||||
status | stringEnum:
enabled
disabled
deletedThe status of this Firewall.
| ||||||||||||||||||||||||||||||||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "firewall123",
"rules": {
"inbound_policy": "DROP",
"inbound": [
{
"protocol": "TCP",
"ports": "22, 80, 443",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"action": "ACCEPT",
"label": "inbound-rule123",
"description": "An example inbound rule description."
}
],
"outbound_policy": "DROP"
"outbound": [
{
"protocol": "TCP",
"ports": "49152-65535",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"action": "ACCEPT",
"label": "outbound-rule123",
"description": "An example outbound rule description."
}
]
},
"devices": {
"linodes": [
123
]
},
"tags": [
"example tag",
"another example"
]
}' \
https://api.linode.com/v4/networking/firewalls
linode-cli firewalls create \
--rules '{"inbound": [{"protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]}' \
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123,
"label": "firewall123",
"rules": {
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
},
"status": "enabled",
"tags": [
"example tag",
"another example"
],
"updated": "2018-01-02T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created Filterable | string <date-time>When this Firewall was created. | ||||||||||||||||||||||||||||||||||||||||
id Filterable | integerThe Firewall’s unique ID. | ||||||||||||||||||||||||||||||||||||||||
label Filterable | string
3..32
charactersThe Firewall’s label, for display purposes only. Firewall labels have the following constraints:
| ||||||||||||||||||||||||||||||||||||||||
rules | objectThe inbound and outbound access rules to apply to the Firewall. A Firewall may have up to 25 rules across its inbound and outbound rulesets.
| ||||||||||||||||||||||||||||||||||||||||
status | stringEnum:
enabled
disabled
deletedThe status of this Firewall.
| ||||||||||||||||||||||||||||||||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||||||||||||||||||||||||||||||
updated Filterable | string <date-time>When this Firewall was last updated. |
errors | array of objects
|
Firewall Delete
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.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/networking/firewalls/123
linode-cli firewalls delete 123
Response Samples
{}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Firewall View
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.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_only |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123
linode-cli firewalls view 123
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123,
"label": "firewall123",
"rules": {
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
},
"status": "enabled",
"tags": [
"example tag",
"another example"
],
"updated": "2018-01-02T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created Filterable | string <date-time>When this Firewall was created. | ||||||||||||||||||||||||||||||||||||||||
id Filterable | integerThe Firewall’s unique ID. | ||||||||||||||||||||||||||||||||||||||||
label Filterable | string
3..32
charactersThe Firewall’s label, for display purposes only. Firewall labels have the following constraints:
| ||||||||||||||||||||||||||||||||||||||||
rules | objectThe inbound and outbound access rules to apply to the Firewall. A Firewall may have up to 25 rules across its inbound and outbound rulesets.
| ||||||||||||||||||||||||||||||||||||||||
status | stringEnum:
enabled
disabled
deletedThe status of this Firewall.
| ||||||||||||||||||||||||||||||||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||||||||||||||||||||||||||||||
updated Filterable | string <date-time>When this Firewall was last updated. |
errors | array of objects
|
Firewall Update
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
enabledordisabledby 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.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Body Schema
label Filterable | string
3..32
charactersThe Firewall’s label, for display purposes only. Firewall labels have the following constraints:
|
status | stringEnum:
enabled
disabled
deletedThe status of this Firewall.
|
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"status": "disabled"
}' \
https://api.linode.com/v4/networking/firewalls/123
linode-cli firewalls update 123 \
--status disabled
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 123,
"label": "firewall123",
"rules": {
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
},
"status": "enabled",
"tags": [
"example tag",
"another example"
],
"updated": "2018-01-02T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created Filterable | string <date-time>When this Firewall was created. | ||||||||||||||||||||||||||||||||||||||||
id Filterable | integerThe Firewall’s unique ID. | ||||||||||||||||||||||||||||||||||||||||
label Filterable | string
3..32
charactersThe Firewall’s label, for display purposes only. Firewall labels have the following constraints:
| ||||||||||||||||||||||||||||||||||||||||
rules | objectThe inbound and outbound access rules to apply to the Firewall. A Firewall may have up to 25 rules across its inbound and outbound rulesets.
| ||||||||||||||||||||||||||||||||||||||||
status | stringEnum:
enabled
disabled
deletedThe status of this Firewall.
| ||||||||||||||||||||||||||||||||||||||||
tags Filterable | array of stringsAn array of tags applied to this object. Tags are for organizational purposes only. | ||||||||||||||||||||||||||||||||||||||||
updated Filterable | string <date-time>When this Firewall was last updated. |
errors | array of objects
|
Firewall Devices List
Returns a paginated list of a Firewall’s Devices. A Firewall Device assigns a
Firewall to a Linode service (referred to as the Device’s entity). Currently,
only Devices with an entity of type linode are accepted.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_only |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123/devices
linode-cli firewalls devices-list 123
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"entity": {
"id": 123,
"label": "my-linode",
"type": "linode",
"url": "/v4/linode/instances/123"
},
"id": 123,
"updated": "2018-01-02T00:01:01"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||
page | integer | ||||||||||||||||
pages | integer | ||||||||||||||||
results | integer |
errors | array of objects
|
Firewall Device Create
Creates a Firewall Device, which assigns a Firewall to a Linode service (referred to
as the Device’s entity). Currently, only Devices with an entity of type linode are accepted.
A Firewall can be assigned a single Linode service 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.
Creating a Firewall Device will apply the Rules from a Firewall to a Linode service.
A firewall_device_add Event is generated when the Firewall Device is added successfully.
Note: When a Firewall is assigned to a Linode and you attempt to migrate the Linode to a data center that does not support Cloud Firewalls, the migration will fail. Use the List Regions endpoint to view a list of a data center’s capabilities.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Body Schema
id Required | integerThe entity’s ID |
type Required | stringEnum:
linodeThe entity’s type. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "linode",
"id": 123
}' \
https://api.linode.com/v4/networking/firewalls/123/devices
linode-cli firewalls device-create 123 \
--id 456 \
--type "linode"
Response Samples
{
"created": "2018-01-01T00:01:01",
"entity": {
"id": 123,
"label": "my-linode",
"type": "linode",
"url": "/v4/linode/instances/123"
},
"id": 123,
"updated": "2018-01-02T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created Filterable | string <date-time>When this Device was created. | ||||||||
entity | objectThe Linode service that this Firewall has been applied to.
| ||||||||
id Filterable | integerThe Device’s unique ID | ||||||||
updated Filterable | string <date-time>When this Device was last updated. |
errors | array of objects
|
Firewall Device Delete
Removes a Firewall Device, which removes a Firewall from the Linode service it was assigned to by the Device. This will remove all of the Firewall’s Rules from the Linode service. If any other Firewalls have been assigned to the Linode service, then those Rules will remain in effect.
A firewall_device_remove Event is generated when the Firewall Device is removed successfully.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
| deviceId | integerRequiredID of the Firewall Device to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/networking/firewalls/123/devices/456
linode-cli firewalls device-delete 123 456
Response Samples
{}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
Firewall Device View
Returns information for a Firewall Device, which assigns a Firewall
to a Linode service (referred to as the Device’s entity). Currently,
only Devices with an entity of type linode are accepted.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_only |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
| deviceId | integerRequiredID of the Firewall Device to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123/devices/456
linode-cli firewalls device-view \
123 456
Response Samples
{
"created": "2018-01-01T00:01:01",
"entity": {
"id": 123,
"label": "my-linode",
"type": "linode",
"url": "/v4/linode/instances/123"
},
"id": 123,
"updated": "2018-01-02T00:01:01"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
created Filterable | string <date-time>When this Device was created. | ||||||||
entity | objectThe Linode service that this Firewall has been applied to.
| ||||||||
id Filterable | integerThe Device’s unique ID | ||||||||
updated Filterable | string <date-time>When this Device was last updated. |
errors | array of objects
|
Firewall Rules List
Returns the inbound and outbound Rules for a Firewall.
This endpoint is in beta.
- Gain access to Linode Cloud Firewall by signing up for our Greenlight Beta program.
- During the beta, Cloud Firewall is not available in every data center region. For the current list of availability, see the Cloud Firewall Product Documentation.
- Please make sure to prepend all requests with
/v4betainstead of/v4, and be aware that this endpoint may receive breaking updates in the future. This notice will be removed when this endpoint is out of beta.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_only |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123/rules
linode-cli firewalls rules-list 123
Response Samples
{
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
inbound | array of objects
| ||||||||||||||||
inbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for inbound traffic. This setting can be overridden by
updating the | ||||||||||||||||
outbound | array of objects
| ||||||||||||||||
outbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for outbound traffic. This setting can be overridden by
updating the |
errors | array of objects
|
Firewall Rules Update
Updates the inbound and outbound Rules for a Firewall. Using this endpoint will replace all of a Firewall’s ruleset with the Rules specified in your request.
Cloud Firewall is not available in every data center region. For the current list of availability, access the Regions List ( GET /regions) endpoint or see the Cloud Firewall Product Documentation.
Authorizations
| personalAccessToken | |
| oauth | firewall:read_write |
Path Parameters
| firewallId | integerRequiredID of the Firewall to access. |
Request Body Schema
inbound | array of objects
| ||||||||||||||||
inbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for inbound traffic. This setting can be overridden by
updating the | ||||||||||||||||
outbound | array of objects
| ||||||||||||||||
outbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for outbound traffic. This setting can be overridden by
updating the |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"inbound_policy": "DROP",
"inbound": [
{
"protocol": "TCP",
"ports": "22, 80, 443",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"action": "ACCEPT",
"label": "inbound-rule123",
"description": "An example inbound rule description."
}
],
"outbound_policy": "DROP"
"outbound": [
{
"protocol": "TCP",
"ports": "49152-65535",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"action": "ACCEPT",
"label": "outbound-rule123",
"description": "An example outbound rule description."
}
]
}' \
https://api.linode.com/v4/networking/firewalls/123/rules
linode-cli firewalls rules-update 123 \
--inbound '[{"protocol": "TCP", "ports": "22, 80, 8080, 443", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]' \
--outbound '[{"protocol": "TCP", "ports": "49152-65535", "addresses": {"ipv4": ["192.0.2.1", "192.0.2.0/24"], "ipv6": ["2001:DB8::/32"]}}]'
Response Samples
{
"inbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"inbound_policy": "DROP",
"outbound": [
{
"action": "ACCEPT",
"addresses": {
"ipv4": [
"192.0.2.0/24"
],
"ipv6": [
"2001:DB8::/32"
]
},
"description": "An example firewall rule description.",
"label": "firewallrule123",
"ports": "22-24, 80, 443",
"protocol": "TCP"
}
],
"outbound_policy": "DROP"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
inbound | array of objects
| ||||||||||||||||
inbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for inbound traffic. This setting can be overridden by
updating the | ||||||||||||||||
outbound | array of objects
| ||||||||||||||||
outbound_policy | stringEnum:
ACCEPT
DROPThe default behavior for outbound traffic. This setting can be overridden by
updating the |
errors | array of objects
|
IP Addresses List
Returns a paginated list of IP Addresses on your Account, excluding private addresses.
Authorizations
| personalAccessToken | |
| oauth | ips:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/ips
linode-cli networking ips-list
Response Samples
{
"data": [
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||||||||||||
page | integer | ||||||||||||||||||
pages | integer | ||||||||||||||||||
results | integer |
errors | array of objects
|
IP Address Allocate
Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please open a support ticket requesting additional addresses before attempting allocation.
Authorizations
| personalAccessToken | |
| oauth | ips:read_write,linodes:read_write |
Request Body Schema
linode_id Required | integerThe ID of a Linode you you have access to that this address will be allocated to. |
public Required | booleanWhether to create a public or private IPv4 address. |
type Required | stringEnum:
ipv4The type of address you are requesting. Only IPv4 addresses may be allocated through this endpoint. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"type": "ipv4",
"public": true,
"linode_id": 123
}' \
https://api.linode.com/v4/networking/ips
linode-cli networking ip-add \
--type ipv4 \
--public true \
--linode_id 123
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
IP Address View
Returns information about a single IP Address on your Account.
Authorizations
| personalAccessToken | |
| oauth | ips:read_only |
Path Parameters
| address | string <ip>RequiredThe address to operate on. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/ips/97.107.143.141
linode-cli networking ip-view 97.107.143.141
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
IP Address RDNS Update
Sets RDNS on an IP Address. Forward DNS must already be set up for reverse DNS to be applied. If you set the RDNS to null for public IPv4 addresses, it will be reset to the default members.linode.com RDNS value.
Authorizations
| personalAccessToken | |
| oauth | ips:read_write |
Path Parameters
| address | string <ip>RequiredThe address to operate on. |
Request Body Schema
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"rdns": "test.example.org"
}' \
https://api.linode.com/v4/networking/ips/97.107.143.141
linode-cli networking ip-update \
97.107.143.141 \
--rdns "test.example.org"
Response Samples
{
"address": "97.107.143.141",
"gateway": "97.107.143.1",
"linode_id": 123,
"prefix": 24,
"public": true,
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
address | string <ip>The IP address. |
gateway Nullable | string <ip>The default gateway for this address. |
linode_id | integerThe ID of the Linode this address currently belongs to. For IPv4 addresses, this is by default the Linode that this address was assigned to on creation, and these addresses my be moved using the /networking/ipv4/assign endpoint. For SLAAC and link-local addresses, this value may not be changed. |
prefix | integerThe number of bits set in the subnet mask. |
public | booleanWhether this is a public or private IP address. |
rdns | stringThe reverse DNS assigned to this address. For public IPv4 addresses, this will be set to a default value provided by Linode if not explicitly set. |
region Filterable | stringThe Region this IP address resides in. |
subnet_mask | string <ip>The mask that separates host bits from network bits for this address. |
type | stringEnum:
ipv4
ipv6
ipv6/pool
ipv6/rangeThe type of address this is. |
errors | array of objects
|
Linodes Assign IPs
Assign multiple IPs to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPv4 Addresses to your Linodes. When the assignment is finished, all Linodes must end up with at least one public IPv4 and no more than one private IPv4.
Authorizations
| personalAccessToken | |
| oauth | ips:read_write,linodes:read_write |
Request Body Schema
assignments Required | array of objectsThe list of assignments to make. You must have read_write access to all IPs being assigned and all Linodes being assigned to in order for the assignments to succeed.
| ||||
region Required | stringThe ID of the Region in which these assignments are to take place. All IPs and Linodes must exist in this Region. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-east",
"assignments": [
{
"address": "12.34.56.100",
"linode_id": 123
},
{
"address": "23.45.67.200",
"linode_id": 234
}
]
}' \
https://api.linode.com/v4/networking/ipv4/assign
linode-cli networking ip-assign \
--region us-east \
--assignments \
'{"address": "12.34.56.100", "linode_id": 123}' \
--assignments \
'{"23.45.67.200", "linode_id": 234}'
Response Samples
{}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
IP Sharing Configure
Configure shared IPs. A shared IP may be brought up on a Linode other than the one it lists in its response. This can be used to allow one Linode to begin serving requests should another become unresponsive.
Authorizations
| personalAccessToken | |
| oauth | ips:read_write,linodes:read_write |
Request Body Schema
ips Required | array of stringsA list of IPs that will be shared with this Linode. When this is finished, the given Linode will be able to bring up these addresses in addition to the Linodes that these addresses belong to. You must have access to all of these addresses and they must be in the same Region as the Linode. |
linode_id Required | integerThe ID of the Linode that the addresses will be shared with. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"linode_id": 123,
"ips": [
"12.34.56.78"
]
}' \
https://api.linode.com/v4/networking/ipv4/share
linode-cli networking ip-share \
--linode_id 123 \
--ips 12.34.56.78
Response Samples
{}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
errors | array of objects
|
IPv6 Pools List
Displays the IPv6 pools on your Account. A pool of IPv6 addresses are routed to all of your Linodes in a single Region. Any Linode on your Account may bring up any address in this pool at any time, with no external configuration required.
Authorizations
| personalAccessToken | |
| oauth | ips:read_only |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/ipv6/pools
linode-cli networking v6-pools
Response Samples
{
"data": [
{
"prefix": 124,
"range": "2600:3c01::2:5000:0",
"region": "us-east",
"route_target": "2600:3c01::2:5000:f"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||
page | integer | ||||||||
pages | integer | ||||||||
results | integer |
errors | array of objects
|
IPv6 Ranges List
Displays the IPv6 ranges on your Account.
An IPv6 range is a
/64block of IPv6 addresses routed to a single Linode in a given Region.Your Linode is responsible for routing individual addresses in the range, or handling traffic for all the addresses in the range.
You must open a support ticket to request a
/64block of IPv6 addresses to be added to your account.
Authorizations
| personalAccessToken | |
| oauth | ips:read_only |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/ipv6/ranges
linode-cli networking v6-ranges
Response Samples
{
"data": [
{
"prefix": 64,
"range": "2600:3c01::",
"region": "us-east",
"route_target": "2600:3c01::ffff:ffff:ffff:ffff"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||
page | integer | ||||||||
pages | integer | ||||||||
results | integer |
errors | array of objects
|
VLANs List
Returns a list of all Virtual Local Area Networks (VLANs) on your Account. VLANs provide a mechanism for secure communication between two or more Linodes that are assigned to the same VLAN and are both within the same Layer 2 broadcast domain.
VLANs are created and attached to Linodes by using the interfaces property for the following endpoints:
- Linode Create ( POST /linode/instances)
- Configuration Profile Create ( POST /linode/instances/{linodeId}/configs)
- Configuration Profile Update ( PUT /linode/instances/{linodeId}/configs/{configId})
There are several ways to detach a VLAN from a Linode:
- Update the active Configuration Profile to remove the VLAN interface, then reboot the Linode.
- Create a new Configuration Profile without the VLAN interface, then reboot the Linode into the new Configuration Profile.
- Delete the Linode.
VLANs cannot be manually renamed. If a VLAN’s label must be changed, create a new VLAN and attach all required Linodes to it.
VLANs cannot be manually deleted. There is no need to manually delete a VLAN. If a VLAN is no longer needed, detach it from all Linodes. A VLANs that are not attached to any Linodes are automatically deleted within a short timeframe.
Note: Only Next Generation Network (NGN) data centers support VLANs. Use the Regions ( /regions) endpoint to view the capabilities of data center regions. If a VLAN is attached to your Linode and you attempt to migrate or clone it to a non-NGN data center, the migration or cloning will not initiate. If a Linode cannot be migrated because of an incompatibility, you will be prompted to select a different data center or contact support.
Authorizations
| personalAccessToken | |
| oauth | linodes:read_only |
Query Parameters
| page |
The page of a collection to return. |
| page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/vlans/
linode-cli networking vlans-list
Response Samples
{
"data": [
{
"created": "2020-01-01T00:01:01",
"label": "vlan-example",
"linodes": [
111,
222
],
"region": "ap-west"
}
],
"page": 1,
"pages": 1,
"results": 1
}{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}Responses
data | array of objects
| ||||||||
page | integer | ||||||||
pages | integer | ||||||||
results | integer |
errors | array of objects
|


