rsp / scripts

Random shell scripts for different tasks
MIT License
112 stars 17 forks source link

Null output on IPv6 address #4

Open stoneycode opened 5 years ago

stoneycode commented 5 years ago

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 ;;