Averiguar la IP pública desde la consola de Linux

Usando CURL

curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
curl -s http://whatismyip.org/

Usando wget

wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Usando Lynx

lynx -dump checkip.dyndns.org

lynx -dump www.whatismyip.com | grep 'Your IP'

Deje un comentario


NOTA - Puede usar estosHTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>