Finding Public IP from Linux Console

Using WhatismyIP.com and wget
wget -q http://www.whatismyip.com/automation/n09230945.asp -O - && echo
Using DynDNS and wget
wget -q -O - checkip.dyndns.orgsed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Using DynDNS and curl
curl -s checkip.dyndns.orgsed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Comments