Table: net_dns_record
DNS records associated with a given domain.
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 anddns_server
configuration argument. For instance, to use Cloudflare's global public server instead:select*fromnet_dns_recordwheredomain = 'steampipe.io'and dns_server = '1.1.1.1:53';
Note: A domain
must be provided in all queries to this table.
Examples
DNS records for a domain
select *from net_dns_recordwhere domain = 'steampipe.io';
List TXT records for a domain
select value, ttlfrom net_dns_recordwhere domain = 'github.com' and type = 'TXT';
Mail server records for a domain in priority order
select target, priority, ttlfrom net_dns_recordwhere domain = 'turbot.com' and type = 'MX'order by priority;
Query examples
- dns_mx_record
- dns_mx_report
- dns_ns_record
- dns_parent_ns_record
- dns_parent_record
- dns_parent_report
- dns_soa_record
- dns_soa_report
- ssl_certificate_record
- ssl_certificate_report
Control examples
- dns_mx_all_ip_public
- dns_mx_at_least_two
- dns_mx_dmarc_record_enabled
- dns_mx_no_duplicate_a_record
- dns_mx_not_contain_ip
- dns_mx_reverse_a_record
- dns_mx_valid_hostname
- dns_ns_all_ip_public
- dns_ns_at_least_two
- dns_ns_authoritative
- dns_ns_different_autonomous_systems
- dns_ns_dns_no_cname_with_other_record
- dns_ns_local_matches_parent_ns_list
- dns_ns_name_valid
- dns_ns_no_cname_with_other_record
- dns_ns_on_different_subnets
- dns_ns_responded
- dns_parent_ns_all_with_type_a_record
- dns_parent_ns_listed_at_parent
- dns_parent_records_found
- dns_soa_expire_value_check
- dns_soa_minimum_value_check
- dns_soa_ns_same_serial
- dns_soa_primary_ns_listed_at_parent
- dns_soa_refresh_value_check
- dns_soa_retry_value_check
- dns_soa_serial_check
- dns_www_all_ip_public
- ssl_certificate_caa_record_configured
- dns_ns_report
.inspect net_dns_record
DNS records associated with a given domain.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
dns_server | text | DNS server name and port used for queries. |
domain | text | Domain name for the record. |
expire | bigint | Specifies SOA expire value in seconds, which indicates when the zone data is no longer authoritative. |
ip | inet | IP address for the record, such as for A records. |
minimum | bigint | Specifies the SOA minimum value in seconds, which indicates how long negative answers are stored in the DNS cache. |
priority | bigint | Priority of the record, such as for MX records. |
refresh | bigint | Specifies 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. |
retry | bigint | Specifies 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. |
serial | bigint | Specifies the SOA serial number. |
tag | text | An ASCII string that represents the identifier of the property represented by the record, such as for CAA records. |
target | text | Target of the record, such as the target address for CNAME records. |
ttl | bigint | Time To Live in seconds for the record in DNS cache. |
type | text | Type of the DNS record: A, CNAME, MX, etc. |
value | text | Value of the record, such as the text of a TXT record. |