Obtener la IP externa de tu router en la consola

Sencillo script escrito en bash para obtener nuestra IP pública si estamos detrás de un router. Visto hoy en howflow.com. Solución 1: wget y whatsmyip.com #!/bin/sh IP=`wget -q -O - http://whatismyip.com/automation/n09230945.asp` echo $IP Solución 2: wget y freeshell.org #!/bin/sh IP=$( wget -qO - http://cfaj.freeshell.org/ipaddr.cgi ) echo $IP Solución 3: lynx y freeshell.org #!/bin/sh IP=$( lynx -dump http://cfaj.freeshell.org/ipaddr.cgi ) echo $IP

You have already tagged this post. Your tags:

Noticia original: solognu.wordpress.com

Valid XHTML 1.0 Strict