Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:sysadmin:tools:digger

digger - dns query on several nameservers

So you've changed something in your DNS Domain. Is it already valid in "The Internet"?

Ask several nameservers at once with digger:

#!/bin/bash
 
# ask several nameservers
 
# usage (same options like dig):
# digger www.example.com
# digger -t aaaa www.example.com
# digger -t ns example.com
 
name=$@
 
cloudflare="1.1.1.1"
google="8.8.8.8"
# this is empty, if you don't use network manager on your machine
networkmanager_local=$(nmcli dev show 2>/dev/null | awk '/DNS/ {print $2}')
# enter your own nameserver ips (use a space as seperator)
myown=""
 
nameserverliste="$cloudflare $google $networkmanager_local $myown"
 
for n in $nameserverliste; do
    echo "dig +short $name @$n"
    dig +short $name @$n
    echo
done

Examples

IPv4 A-Record (query for "normal" name)

$ ./digger www.example.com
dig +short www.example.com @1.1.1.1
93.184.216.34

dig +short www.example.com @8.8.8.8
93.184.216.34

dig +short www.example.com @192.168.0.1
93.184.216.34

dig +short www.example.com @2001:db8:1234:4567::1
93.184.216.34

IPv6 Query

$ ./digger -t aaaa www.example.com
dig +short -t aaaa www.example.com @1.1.1.1
2606:2800:220:1:248:1893:25c8:1946

dig +short -t aaaa www.example.com @8.8.8.8
2606:2800:220:1:248:1893:25c8:1946

dig +short -t aaaa www.example.com @192.168.0.1
2606:2800:220:1:248:1893:25c8:1946

dig +short -t aaaa www.example.com @2001:db8:1234:4567::1
2606:2800:220:1:248:1893:25c8:1946

Authoritative Name Server

$ ./digger -t ns example.com
dig +short -t ns example.com @1.1.1.1
a.iana-servers.net.
b.iana-servers.net.

dig +short -t ns example.com @8.8.8.8
b.iana-servers.net.
a.iana-servers.net.

dig +short -t ns example.com @192.168.0.1
b.iana-servers.net.
a.iana-servers.net.

dig +short -t ns example.com @2001:db8:1234:4567::1
b.iana-servers.net.
a.iana-servers.net.
en/sysadmin/tools/digger.txt · Zuletzt geändert: 2019-10-01 23:11 von hella

Seiten-Werkzeuge