3

Both the nslookup and host commands return IPv4 addresses only. How can i retrieve the IPv6 address of a website using the terminal?

(I have googled around, unfortunately I couldn't find anything useful)

  • 3
    host does return IPv6 addresses if they're available. – Robert Stiffler Oct 31 '15 at 0:01
3

You need a way to specify that you want to retrieve an AAAA record instead of an A record. You'll want to use the dig command for this, which is the replacement for nslookup anyways.

dig AAAA websitehostname

or if you don't want the verbose output:

dig AAAA +short websitehostname
1

The usual way is to ask for the AAAA resource:

nslookup -query=AAAA $hostname

And:

dig AAAA $hostname

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.