turbot/net_insights

Query: dns_parent_record

Usage

powerpipe query net_insights.query.dns_parent_record

Steampipe Tables

SQL

with domain_list as (
select distinct domain, substring( domain from '^(?:[^/:]*:[^/@]*@)?(?:[^/:.]*\.)+([^:/]+)' ) as tld from net_dns_record where domain = $1
),
domain_parent_server as (
select l.domain, d.domain as tld, d.target as parent_server from net_dns_record as d inner join domain_list as l on d.domain = l.tld where d.type = 'SOA'
),
domain_parent_server_ip as (
select * from net_dns_record where domain in (select parent_server from domain_parent_server)
),
domain_parent_server_with_ip as (
select domain_parent_server.domain as "Domain", domain_parent_server.tld as "Top Level Domain (TLD)", domain_parent_server.parent_server as "Parent Server", domain_parent_server_ip.ip as "IP Address" from domain_parent_server inner join domain_parent_server_ip on domain_parent_server.parent_server = domain_parent_server_ip.domain where domain_parent_server_ip.type = 'A' order by domain_parent_server.domain
)
select * from domain_parent_server_with_ip;

Params

ArgsNameDefaultDescriptionVariable
$1domain_name_input

    Dashboards

    The query is used in the dashboards: