steampipe plugin install net

Table: net_dns_record - Query DNS Records using SQL

DNS service is a scalable, reliable, and managed Domain Name System (DNS) service that provides a high-performance, global footprint for your public-facing internet resources and resolves DNS zones. It enables you to distribute traffic to your endpoints and ensures high availability and failover, thus improving the performance of your web applications.

Table Usage Guide

The net_dns_record table provides insights into DNS Records. As a network administrator, you can explore DNS record-specific details through this table, including record types, domain names, and associated metadata. Utilize it to uncover information about DNS records, such as those with misconfigured settings, the association between domain names and IP addresses, and the verification of DNS record settings.

Important Notes

The default DNS server used for all requests is the Google global public server, 8.8.8.8. This default can be overriden in 2 ways:

  • Update the dns_server configuration argument.
  • Specify dns_server in the query, which overrides the default and dns_server configuration argument. For instance, to use Cloudflare's global public server instead:
select
*
from
net_dns_record
where
domain = 'steampipe.io'
and dns_server = '1.1.1.1:53';
select
*
from
net_dns_record
where
domain = 'steampipe.io'
and dns_server = '1.1.1.1:53';
  • A domain must be provided in all queries to this table.

Examples

DNS records for a domain

Explore DNS records associated with a specific domain to understand its configuration and structure. This could be beneficial for troubleshooting or auditing purposes.

select
*
from
net_dns_record
where
domain = 'steampipe.io';
select
*
from
net_dns_record
where
domain = 'steampipe.io';

List TXT records for a domain

Explore the text records for a specific domain to understand its associated data and time-to-live values. This could be useful for verifying domain ownership or understanding security settings.

select
value,
ttl
from
net_dns_record
where
domain = 'github.com'
and type = 'TXT';
select
value,
ttl
from
net_dns_record
where
domain = 'github.com'
and type = 'TXT';

Mail server records for a domain in priority order

Explore the priority order of mail servers for a specific domain. This is beneficial for understanding the order in which email will be delivered or rerouted if the primary server is not available.

select
target,
priority,
ttl
from
net_dns_record
where
domain = 'turbot.com'
and type = 'MX'
order by
priority;
select
target,
priority,
ttl
from
net_dns_record
where
domain = 'turbot.com'
and type = 'MX'
order by
priority;

Schema for net_dns_record

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
dns_servertext=DNS server name and port used for queries.
domaintext=Domain name for the record.
expirebigintSpecifies SOA expire value in seconds, which indicates when the zone data is no longer authoritative.
ipinetIP address for the record, such as for A records.
minimumbigintSpecifies the SOA minimum value in seconds, which indicates how long negative answers are stored in the DNS cache.
prioritybigintPriority of the record, such as for MX records.
refreshbigintSpecifies the SOA refresh interval in seconds, which configures how often a name server should check its primary server to see if there has been any updates to the zone which it does by comparing Serial numbers.
retrybigintSpecifies SOA retry value in seconds, which indicates how long a name server should wait to retry an attempt to get fresh zone data from the primary name server if the first attempt should fail.
serialbigintSpecifies the SOA serial number.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagtextAn ASCII string that represents the identifier of the property represented by the record, such as for CAA records.
targettextTarget of the record, such as the target address for CNAME records.
ttlbigintTime To Live in seconds for the record in DNS cache.
typetext=Type of the DNS record: A, CNAME, MX, etc.
valuetextValue of the record, such as the text of a TXT record.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- net

You can pass the configuration to the command with the --config argument:

steampipe_export_net --config '<your_config>' net_dns_record