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)
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)
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
The usual way is to ask for the AAAA resource:
nslookup -query=AAAA $hostname
And:
dig AAAA $hostname