turbot/net_insights
Loading controls...

Control: DNS should have at least 2 name servers

Description

Only having 1 name server leaves you vulnerable to that name server failing and taking down your website. It is recommended to have at least 2 name servers for your domain to provide failover capability in the event one name server fails.

Usage

Run the control in your terminal:

powerpipe control run net_insights.control.dns_ns_at_least_two

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run net_insights.control.dns_ns_at_least_two --share

Steampipe Tables

Params

ArgsNameDefaultDescriptionVariable
$1domain_names
["github.com","microsoft.com"]
DNS domain names.

SQL

select
domain as resource,
case
when count(*) < 2 then 'alarm'
else 'ok'
end as status,
domain || ' has ' || count(*) || ' name servers.' as reason
from
net_dns_record
where
domain in (
select
jsonb_array_elements_text(to_jsonb($1 :: text [ ]))
)
and type = 'NS'
group by
domain,
type;