curl ifconfig.me/ip -> IP Adress curl ifconfig.me/host -> Remote Host curl ifconfig.me/ua ->User Agent curl ifconfig.me/port -> Port thonks to http://ifconfig.me/
Short command, easy to remember
Instead of opening your browser, googling "whatismyip"... Also useful for scripts. dig can be found in the dnsutils package.
Yeah I know it's been up here a million times, but this service is a really clean and nice one. Nothing but your IP address on it. Actually I was to write something like this, and noticed this on appspot... ;) Show Sample Output
Works on any machine with nmap installed. Previous version does not work on machines without "seq". Also works on subnets of any size. Show Sample Output
Curl is not installed by default on many common distros anymore. wget always is :)
wget -qO- ifconfig.me/ip
Gets all kind of info, ifconfig.me rocks ... for just the ip addess you can use ifconfig.me or ifconfig.me/ip Show Sample Output
should be very consistent cause it's google :-)
Taking file with ip ranges, each on it's own line like:
cat ipranges.txt
213.87.86.160-213.87.86.193
213.87.87.0-213.87.88.255
91.135.210.0-91.135.210.255
command returns deaggregated ip ranges using ipcalc deaggregate feature like that:
213.87.86.160/27
213.87.86.192/31
213.87.87.0/24
213.87.88.0/24
91.135.210.0/24
Useful for configuring nginx geo module
Show Sample Output
nmap for windows and other platforms is available on developer's site: http://nmap.org/download.html nmap is robust tool with many options and has various output modes - is the best (imho) tool out there.. from nmap 5.21 man page: -oN/-oX/-oS/-oG : Output scan in normal, XML, s| Show Sample Output
Very effective, use only DNS protocol. The @ part is optional if you already set opendns servers as default ns servers.
Get your external ip adress thanks to http://www.icanhazip.com
Relies on ifconfig.me functioning. It's about as easy as it gets, and memorable to old geeks too. Show Sample Output
Short list of all ip. Shows even the newly supported multiple ip address on the same interface (see eth1). For ipv6 use -6 Show Sample Output
It uses the following GNU grep options: "-o" which shows only the matching part of the line and "-P" which allows the use of Perl regular expressions. Show Sample Output
alternative to
curl ifconfig.me
for those that don't have curl
Show Sample Output
has the benefit of being a bit more cross-platform.
gives u each configured IP in a seperate line. Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: