Who hosts that site? (a bash alias),

published at 11:09pm on 09/06/11

More than once (especially during the recent AWS outages) I have found myself wondering what network hosts a given web service’s servers. In general, this process has involved my getting the IP address of a particular hostname, and then doing a whois lookup on that IP address to query ARIN to find out which network owns the IP address of that server. This generally gives a pretty good indication of where the server is hosted.

Well that process was getting tedious, so I finally added the following alias to my .bashrc:

whip () { whois `resolveip -s $*`; }

Hereafter, you can type “whip ” (that’s Whois Host IP) to get the network information. Let’s try it out:

$ whip www.foursquare.com
# Query terms are ambiguous.  The query is assumed to be:
#     "n"
# Use "?" to get help.

# The following results may also be obtained via:
# http://whois.arin.net/rest/nets;q=

American Registry for Internet Numbers NET50 (NET-50-0-0-0-0) -
Amazon.com, Inc. AMAZON-EC2-8 (NET-50-16-0-0-1) -

Looks like Foursquare is hosted on Amazon AWS (which we all know because they’ve fallen victim to some of those recent outages).

Now of course this doesn’t always get you the granular detail you need, but for a quick first pass, this should do the trick.

Filed under: Technology

Leave a Reply: