Files
shell-scripts/public-ip.sh
T

11 lines
218 B
Bash
Executable File

#!/bin/bash
# does not always work, when you have an IPv6 connection
# dig +short A myip.opendns.com @resolver1.opendns.com
curl https://ipinfo.io/ip
echo ""
dig +short AAAA myip.opendns.com @resolver1.opendns.com