X

Determine Your Upstream DNS Resolver

The following one-liner Bash will output your upstream DNS resolver. You will need to install the whois package for this to work. Akamai is deprecating whoami.akamai.net and succeeding it with whoami.ds.akahelp.net so if you have a choice of what to count on in the future, I’d go with those.

whois $(dig whoami.akamai.net +short) | grep -i 'organization:'

DNS=$(dig whoami.ds.akahelp.net +short TXT | awk '{print $2}');whois $(sed -e 's/^"//' -e 's/"$//' <<<"$DNS") | grep -i 'netname:'

DNS=$(dig whoami.ds.akahelp.net +short TXT | awk '{print $2}');whois $( echo $DNS|tr -d '"' ) | grep -i 'netname:'

My results:

sysinfoio:~$ DNS=$(dig whoami.ds.akahelp.net +short TXT | awk '{print $2}');whois $(sed -e 's/^"//' -e 's/"$//' <<<"$DNS") | grep -i 'netname'
netname: CLOUDFLARE_2400_CB00_0000_36
sysinfoio:~$ DNS=$(dig whoami.ds.akahelp.net +short TXT | awk '{print $2}');whois $( echo $DNS|tr -d '"' ) | grep -i 'netname:'
netname: CLOUDFLARE_2400_CB00_0000_36
sysinfoio:~$ whois $(dig whoami.akamai.net +short) | grep -i 'organization:'
Organization: Cloudflare, Inc. (CLOUD14)

 

Disqus Comments Loading...
All Rights ReservedRegular Version