Ubuntu получить внешний IP
curl -s https://checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Ugly Unicorn
curl -s https://checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
dig +short myip.opendns.com @resolver1.opendns.com