Table: digitalocean_firewall - Query DigitalOcean Firewalls using SQL
DigitalOcean Firewalls are a security feature that controls the traffic to your Droplet. Firewalls place a barrier between your servers and other machines on the network to protect them from external attacks. Firewalls can be customized to only allow traffic to certain ports and addresses.
Table Usage Guide
The digitalocean_firewall
table provides insights into firewall configurations within DigitalOcean. As a DevOps engineer, explore firewall-specific details through this table, including inbound and outbound rules, associated Droplets, and tags. Utilize it to uncover information about firewall rules, the Droplets they apply to, and the overall security of your network.
Examples
Basic info
Explore which firewalls have unrestricted inbound access, potentially posing a security risk. This is useful for identifying and mitigating potential vulnerabilities in your network's security.
select id, name, created_at, statusfrom digitalocean_firewall;
select id, name, created_at, statusfrom digitalocean_firewall;
List firewalls whose inbound access is not restricted
select id, name, created_at, statusfrom digitalocean_firewall, jsonb_array_elements(inbound_rules) as iwhere i -> 'sources' -> 'addresses' = '["0.0.0.0/0","::/0"]';
select digitalocean_firewall.id, digitalocean_firewall.name, digitalocean_firewall.created_at, digitalocean_firewall.statusfrom digitalocean_firewall, json_each(inbound_rules) as iwhere json_extract(i.value, '$.sources.addresses') = '["0.0.0.0/0","::/0"]';
List failed firewalls
Identify instances where firewall creation attempts have been unsuccessful. This could be useful in troubleshooting and ensuring the security of your digital assets.
select id, name, created_at, statusfrom digitalocean_firewallwhere status = 'failed';
select id, name, created_at, statusfrom digitalocean_firewallwhere status = 'failed';
Query examples
- droplet_droplets_for_network_firewall
- droplet_firewall_configuration
- network_firewall_1_year_count
- network_firewall_24_hours_count
- network_firewall_30_90_days_count
- network_firewall_30_days_count
- network_firewall_90_365_days_count
- network_firewall_attached
- network_firewall_count
- network_firewall_creation_month
- network_firewall_inbound_analysis
- network_firewall_input
- network_firewall_outbound_analysis
- network_firewall_overview
- network_firewall_tags
- network_firewall_unrestricted_inbound_rules
- network_firewall_unrestricted_inbound_rules_count
- network_firewall_unrestricted_outbound_rules
- network_firewall_unrestricted_outbound_rules_count
- network_firewalls_for_droplet
- network_firewalls_for_network_vpc
- network_vpcs_for_network_firewall
Schema for digitalocean_firewall
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
created_at | timestamp with time zone | A time value given in ISO8601 combined date and time format that represents when the Firewall was created. | |
droplet_ids | jsonb | The list of the IDs of the Droplets assigned to the Firewall. | |
id | text | = | The unique universal identifier of this firewall. |
inbound_rules | jsonb | The inbound access rule block for the Firewall. | |
name | text | The name of the Firewall. | |
outbound_rules | jsonb | The outbound access rule block for the Firewall. | |
pending_changes | jsonb | An list of object containing the fields, `droplet_id`, `removing`, and `status`. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. | |
status | text | A status string indicating the current state of the Firewall. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
urn | text | The uniform resource name (URN) for the Firewall. |