↑ ↓ select, Enter open, Esc close

#dns

18 one-liners with this tag.

All one-liners tagged dns

Check a domain's DKIM key in DNS

$dig +short default._domainkey.example.com TXT
harmlessDNS

Check DNS propagation across public resolvers

$for ns in 1.1.1.1 8.8.8.8 9.9.9.9 208.67.222.222; do echo "$ns: $(dig +short @$ns example.com A | tr '\n' ' ')"; done
harmlessDNS

Check if a server IP is on the Spamhaus blacklist

$dig +short $(echo 203.0.113.10 | awk -F. '{print $4"."$3"."$2"."$1}').zen.spamhaus.org
harmlessDNS

Check the CAA record of a domain

$dig +short example.com CAA
harmlessDNS

Check whether DNSSEC works for a domain

$dig @1.1.1.1 +dnssec example.com SOA | grep -E "flags:|RRSIG|status:"
harmlessDNS

Compare the SOA serial on all nameservers

$for ns in $(dig +short example.com NS); do echo "$ns $(dig +short @$ns example.com SOA | awk '{print $3}')"; done
harmlessDNS

Look up the MX records of a domain

$dig +short example.com MX
harmlessDNS

Look up the reverse DNS (PTR) of an IP address

$dig +short -x 203.0.113.10
harmlessDNS

Query a DNS record directly at the authoritative nameserver

$dig @$(dig +short example.com NS | head -n 1) example.com A +norecurse +short
harmlessDNS

Query any DNS record with its TTL

$dig example.com A +noall +answer
harmlessDNS

Show a domain's DNS zone in Plesk

#plesk bin dns --info example.com
harmlessDNS

Show the authoritative nameservers of a domain

$dig +short example.com NS
harmlessDNS

Show the DMARC policy of a domain

$dig +short _dmarc.example.com TXT
harmlessDNS

Show the SPF record of a domain

$dig +short example.com TXT | grep -i "v=spf1"
harmlessDNS

Test a website on a new server before the DNS change

$curl -sSI --resolve example.com:443:203.0.113.10 https://example.com/
harmlessNetwork

Trace DNS delegation from the root zone

$dig +trace example.com
harmlessDNS

Verify a real Googlebot via reverse DNS

$n=$(host 66.249.66.1 | awk '/pointer/ {print $NF}'); echo "PTR: $n"; host "$n"
harmlessSEO checks

Verify reverse DNS of a mail server IP (FCrDNS)

$ptr=$(dig +short -x 203.0.113.10 | head -n 1); echo "PTR: $ptr"; dig +short "$ptr" A
harmlessDNS

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.