I'm trying to figure out how to obtain my external IP (IPv4) via Terminal without connecting to a remote website or service.
Here's what I've found so far - these all use remote/external checking:
- curl ifconfig.me
- curl icanhazip.com
- curl -s checkip.dyndns.org | grep -Eo '[0-9.]+'
- dig +short myip.opendns.com @resolver1.opendns.com
Is it even possible without checking some external source?