linux

curl ifconfig.me

windows

Invoke-RestMethod http://ifconfig.me/ip

mac

curl ipinfo.io
curl ipinfo.io/ip