SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks

Sunday, November 10, 2013

Find WAN / public IP from command line

There are many websites and web scripts available to know your external (WAN/INTERNET/PUBLIC) IP address. To find out the wan IP address from command line below are two simple methods

The below two methods rely on external services to detect the IP address. Any one of the listed service can be used

1) curl :

Can be installed by running command "sudo apt-get install curl". To know the IP run command

my preferred url is  a service by opendns and can be replaced with any one of the above urls.

2) wget :

By default wget would be installed on most of the system if not can be installed with command "sudo apt-get install wget". To know the IP run command
wget -O - -q ; echo 
Continue Reading...