7

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)

jberryman
  • 103
  • 4
olfek
  • 711
  • 3
  • 7
  • 20

2 Answers2

8

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
deltaray
  • 1,301
  • 2
  • 11
  • 19
1

The usual way is to ask for the AAAA resource:

nslookup -query=AAAA $hostname

And:

dig AAAA $hostname