Firewalls, also known as Security Groups, are sets of rules configured to filter IP addresses. These rules are applied to an instance to control the networking access to them.
Your account will have an default security group
in each region which is applied to any instance that has no other defined security group. Unless you change default security group
this security group denies all incoming traffic and allows only outgoing traffic to your instance.
IDrive® Compute web console creates a default_firewall security group
whenever the first instance is created in the respective region. This group allows all ingress and egress traffic to your instance by default. All operations are allowed on this firewall like any other firewall such as adding and editing rules. However, this firewall cannot be renamed in the web console.
If this firewall is deleted by the user, the system will recreate this firewall whenever a new instance is created in that particular region.
List of Firewalls/Security Groups
GET |
https://la3.networks.api.idrivecompute.io/v2.0/security-groups |
Authorizations |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X GET \ https://la3.networks.api.idrivecompute.io/v2.0/security-groups
Response Samples
{ "security_groups": [ { "description": "Default security group", "tags": [], "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2021-03-10T11:16:43Z", "updated_at": "2021-03-10T11:16:43Z", "revision_number": 1, "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "23f0266f-9db0-468a-b141-d3b8b005dfa8", "name": "default" }, { "description": "Security Group for allowing ingress traffic", "tags": [], "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2021-03-10T11:16:44Z", "updated_at": "2021-03-10T11:16:44Z", "revision_number": 3, "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "b2522546-bc58-4cb3-a844-62c0aa7ce00e", "name": "default_firewall" } ] }
Note - This API provides rules associated with the security group as well. It is not shown in the sample response.
Create Firewall/Security Group
POST |
https://la3.networks.api.idrivecompute.io/v2.0/security-groups |
Authorizations |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -H "Content-Type: application/json" \ -X POST \ -d "{ "security_group": { "name": "new-webservers", "description": "security group for webservers" } }" \ https://la3.networks.api.idrivecompute.io/v2.0/security-groups
Response Samples
{ "security_group": { "description": "security group for webservers", "tags": [], "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2022-10-07T09:04:12Z", "updated_at": "2022-10-07T09:04:12Z", "security_group_rules": [ { "direction": "egress", "protocol": null, "description": null, "tags": [], "port_range_max": null, "updated_at": "2022-10-07T09:04:12Z", "revision_number": 0, "id": "540224c7-5f01-4b9b-8e33-362fa29fae18", "remote_group_id": null, "remote_ip_prefix": null, "created_at": "2022-10-07T09:04:12Z", "security_group_id": "28461503-1445-415b-83e5-b9e06c893901", "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "port_range_min": null, "ethertype": "IPv6", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7" }, { "direction": "egress", "protocol": null, "description": null, "tags": [], "port_range_max": null, "updated_at": "2022-10-07T09:04:12Z", "revision_number": 0, "id": "d3120615-ab46-44c1-a6a8-fcc13b34f185", "remote_group_id": null, "remote_ip_prefix": null, "created_at": "2022-10-07T09:04:12Z", "security_group_id": "28461503-1445-415b-83e5-b9e06c893901", "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "port_range_min": null, "ethertype": "IPv4", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7" } ], "revision_number": 1, "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "28461503-1445-415b-83e5-b9e06c893901", "name": "new-webservers" } }
Delete Firewall/Security Group
DELETE |
https://la3.networks.api.idrivecompute.io/v2.0/security-groups/{security_group_id} |
Authorization |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X DELETE \ https://la3.networks.api.idrivecompute.io/v2.0/security-groups/ 28461503-1445-415b-83e5-b9e06c893901
Response Samples
The response is empty and returns the HTTP 204 response code in the case of a successful request.
List of Firewall/Security Group Rules
GET |
https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules?security_group_id={security_group_id} |
Authorization |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X GET \ https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules? security_group_id=28461503-1445-415b-83e5-b9e06c893901
Response Samples
{ "security_group_rules": [ { "remote_group_id": null, "direction": "egress", "protocol": null, "description": null, "ethertype": "IPv6", "remote_ip_prefix": null, "port_range_max": null, "updated_at": "2022-10-07T09:20:07Z", "security_group_id": "e5d6c57d-1b48-42d4-b270-acda2483dba6", "port_range_min": null, "revision_number": 0, "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2022-10-07T09:20:07Z", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "85ca98da-c765-4cfa-8dc3-40729a32ecd9" }, { "remote_group_id": null, "direction": "egress", "protocol": null, "description": null, "ethertype": "IPv4", "remote_ip_prefix": null, "port_range_max": null, "updated_at": "2022-10-07T09:20:07Z", "security_group_id": "e5d6c57d-1b48-42d4-b270-acda2483dba6", "port_range_min": null, "revision_number": 0, "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2022-10-07T09:20:07Z", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "9195964e-415b-44ad-8bac-73dcb780fd58" } ] }
Create Firewall/Security Group Rule
POST |
https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules |
Authorization |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -H "Content-Type: application/json" \ -X POST \ -d "{ "security_group_rule": { "direction": "ingress", "port_range_min": "80", "ethertype": "IPv4", "port_range_max": "80", "protocol": "tcp", "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a" } }" \ https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules
Response Samples
{ "security_group_rule": { "remote_group_id": null, "direction": "ingress", "protocol": "tcp", "description": "", "ethertype": "IPv4", "remote_ip_prefix": null, "port_range_max": 80, "updated_at": "2022-10-07T10:57:59Z", "security_group_id": "e5d6c57d-1b48-42d4-b270-acda2483dba6", "port_range_min": 80, "revision_number": 0, "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2022-10-07T10:57:59Z", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "252f0944-2973-4fb2-b502-8eb44a8e92b0" } }
View Firewall/Security Group Rule
GET |
https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules/{security_group_rule_id} |
Authorization |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X GET \ https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules/ 252f0944-2973-4fb2-b502-8eb44a8e92b0
Response Samples
{ "security_group_rule": { "remote_group_id": null, "direction": "ingress", "protocol": "tcp", "description": "", "ethertype": "IPv4", "remote_ip_prefix": null, "port_range_max": 80, "updated_at": "2022-10-07T10:57:59Z", "security_group_id": "e5d6c57d-1b48-42d4-b270-acda2483dba6", "port_range_min": 80, "revision_number": 0, "tenant_id": "b88176b3de3f4771aa183e8bd7e1edc7", "created_at": "2022-10-07T10:57:59Z", "project_id": "b88176b3de3f4771aa183e8bd7e1edc7", "id": "252f0944-2973-4fb2-b502-8eb44a8e92b0" } }
Delete Firewall/Security Group Rule
DELETE |
https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules/{security_group_rule_id} |
Authorization |
X-Auth-Token |
Request Samples
curl -H "X-Auth-Token: ${TOKEN}" \ -X DELETE \ https://la3.networks.api.idrivecompute.io/v2.0/security-group-rules/ 252f0944-2973-4fb2-b502-8eb44a8e92b0
Response Samples
The response is empty and returns the HTTP 204 response code in the case of a successful request.