No output when the setup only has an IPv6 address. The resolver returns a non-existing domain when invoked. Workaround is to include both queries. On IPv4 locations, the command will output the address for v4 and a timeout for v6
case "$1" in ""|dns) dig +short myip.opendns.com @resolver1.opendns.com ; dig +short -6 myip.opendns.com aaaa @resolver1.opendns.com ;;
No output when the setup only has an IPv6 address. The resolver returns a non-existing domain when invoked. Workaround is to include both queries. On IPv4 locations, the command will output the address for v4 and a timeout for v6
case "$1" in ""|dns) dig +short myip.opendns.com @resolver1.opendns.com ; dig +short -6 myip.opendns.com aaaa @resolver1.opendns.com ;;