The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,512 other followers

domain name system – How to test DNS glue record? – Server Fault

Posted by jpluimers on 2016/05/26

Thanks Adrian W for providing the below example in your answer about obtaining GLUE record information for a domain.

It is an excellent showcase for the $IFS Internal Field Separator available in any nx shell.

In this case it is used to get the TLD (top-level domain) from the domain name specified at the command-line.

After that, it obtains the name servers for that TLD, and queries the glue records there, both using dig.

Here is a little shell script which implements Alnitak’s answer:

#!/bin/sh
S=${IFS}
IFS=.
for P in $1; do
  TLD=${P}
done
IFS=${S}

echo "TLD: ${TLD}"
DNSLIST=$(dig +short ${TLD}. NS)
for DNS in ${DNSLIST}; do
  echo "Checking ${DNS}"
  dig +norec +nocomments +noquestion +nostats +nocmd @${DNS} $1 NS
done

Pass the name of the domain as parameter:

./checkgluerecords.sh example.org

–jeroen

via domain name system – How to test DNS glue record? – Server Fault.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: