History
Topics
Top Posts
Blog Stats
- 225,406 hits
Anything about Ubuntu, Centos, openSuSe and Fedora
There are few other guide in getting your current WAN IP on Linux console or fetching it within a shell script. But this one works for me.
1. To get the current WAN IP:
$> echo "$(wget http://automation.whatismyip.com/n09230945.asp -O - -o /dev/null)"
2. For LAN IP address/es:
$> ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
Reblogged this on Gigable – Tech Blog.