The `awk` Command

January 18, 2025 note-to-self

To determine whether a website is using only IPv6 or if it supports both IPv4 and IPv6 (dual stack), you can do:

a. Use ping

# To ping via IPv6
ping6 example.com

# To ping via IPv4
ping example.com

If only the IPv6 ping is successful, the site might not support IPv4.

b. Use nslookup with -type

# Check for IPv6 address
nslookup -type=AAAA example.com

# Check for IPv4 address
nslookup -type=A example.com

If only the AAAA record returns an address and the A record returns nothing, the site may only use IPv6.

c. Use dig

The dig command provides a detailed DNS query. You can check for both address records:

# For IPv6
dig AAAA example.com

# For IPv4
dig A example.com

Again, if only the AAAA record has an entry and the A record does not, the site probably just supports IPv6.

d. Use curl

curl -I -6 http://example.com  # For IPv6
curl -I -4 http://example.com  # For IPv4

2. Using Online Tools

There are several online tools that can help you check a domain's IPv4 and IPv6 support: - MXToolbox (https://mxtoolbox.com): Allows you to check DNS records, including A and AAAA. - DNSChecker (https://dnschecker.org): Provides a global view of DNS records, including IPv4 and IPv6. - WhatIsMyIPAddress (https://whatismyipaddress.com): Offers tools to check if a site is reachable via IPv4 or IPv6.