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:
steampipe check net_insights.control.dns_ns_at_least_two
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share net_insights.control.dns_ns_at_least_two
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | domain_names |
| 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 reasonfrom net_dns_recordwhere domain in ( select jsonb_array_elements_text(to_jsonb($1 :: text [ ])) ) and type = 'NS'group by domain, type;