Hacker News new | past | comments | ask | show | jobs | submit login
Google now tells you your IP when you ask it in search (google.com)
144 points by suivix on Oct 19, 2011 | hide | past | favorite | 89 comments



This is something that's been going on for a while - Google killing small web apps; Convertors, calculators, movie listings, ip finders, weather stats, stocks. It's not all low-hanging fruit. I'm not saying they shouldn't be doing this, nor that it's intentional. Their goal is to be the best search engine which means connecting searchers with answers as quickly as they can. But even so, it sucks for the web apps who get made redundant by Google.

Also, it's interesting to compare this with, say, Yahoo's approach. Yahoo would have put an "IP" widget and a "weather" widget on their portal homepage. Google waits until the user searches for the info before giving it to them - which keeps their homepage clean and more importantly keeps their message strong "we do search well", while Yahoo's always seemed to be "we do a whole bunch of stuff, some of which you may need". I know Google/Yahoo comparisons aren't really du jour, but still it's interesting.


It sucks, but if the small app someone wrote can be duplicated in 10 seconds of coding then its days were already numbered.


This is why I mentioned that it's not all low hanging fruit. Movie listings? Requires feed integration, handling a lot of data, non-trivial presentation. Same with weather. Getting a good weather app is not 10 seconds of coding. Some, like ip address, are simple things, but even so whatismyip.com built a huge range of products around that one simple service.


I always hated how weather sites could not just detect my approximate location based off of ip (eg weather.com) and required me to enter in my zip code, google fixed that.


http://www.wunderground.com/ has worked by geoip for a while now.


Pretty sure they got that after google. For years, wunderground was the best of a bunch of terrible web sites. They're still about 40% ads by pixel though, and have a hugely cluttered UI. I'll use them as a second step (Google's "detailed forecast" link) after typing "weather" into the chrome address bar. But broadly, they still suck compared to Google.


http://www.wund.com/

less typing and a much cleaner interface.


About a year ago I've built a small weather app which detects users' location using Geolocation API: http://wthr.in



Actually the only way for a "my IP" application to make some money is be indexed as first result in Google I guess. At least I never remember the domain of one of that 200 trivial apps and search on google. So makes a lot of sense they showing you the result if you search for "ip" or "my ip".


I bet some of them find alternative ways to get visitors and that a decent number of people use the bookmark feature. Now, how valuable a visitor is to a page like that is another matter.


with the more significant things like movie listings, weather..... it's about Google + the world's information. They want it to flow through them/be indexed by them/found and offered up by them


Well, a lot of those webapps fall in the "feature, not a product category" and were pretty clearly living life on the edge.

I await the day I can anagram via the search bar.


What's worse is that they could drop these services in the future, all of a sudden there is nothing capable of performing the function.


...leaving a gap in the market which something would surely arise to fill.


It still disadvantages those people who want to use that service while there is nothing to perform the job. Take google recently killing code search http://googleblog.blogspot.com/2011/10/fall-sweep.html. One of the commenter's had been building their own code search platform before google did. Google entering the market meant that this was no longer viable though http://news.ycombinator.com/item?id=3112444. A new code search platform will no doubt pop up, but it will take a while to get something that works well.

This is the problem with the giant company stepping into new areas, it often leaves destruction in its wake.


You don't even need to do it in a question form, just a search for 'ip' works

http://www.google.com/search?q=ip


Duck Duck Go does this.

https://duckduckgo.com/?q=ip


DDG in general seems to do a much better job of second-guessing what I'm looking for. Amazing how good it's become and that Google is (in my experience at least) playing catch-up.


Same issue as Wolfram Alpha's IP guesser. See https://news.ycombinator.com/item?id=3128949


Great, this saves me that agonizing click on whatismyip.com.


http://jsonip.com/ is good too, but http://whatismyip.org is even better because you can just select all and copy right away.


jsonip and whatismyip tells me the the IPv4 address though. Google is giving me my IPv6 address!

Would be cool to get both somehow.


To force the IPv6 IP on Google - http://ipv6.google.com/search?q=what+is+my+ip


It's telling me regardless, It's not telling me the IPv4 address.


Internode in Australia defaults to IPV6 for Google. Your isp may do the same?


I have IPv6 and IPv4 through my ISP (TimeWarner) - but I have to explicitly tell Google that I want an IPv6 connection with the subdomain.


Can you pls pm me? I have some questions reg. twc connection.


Yeah, and I think google has just accidentally "killed" whatismyip.com . Not totally but I'm pretty sure the site's traffic will decrease significantly


$ curl ifconfig.me

Or just http://ifconfig.me/


I like http://icanhazip.com Great for scripts too.


There's always http://checkip.dyndns.org , which has a lot lower chance of just being suddenly removed for whatever reason.


Remember, if the answer is delivered with HTTP, the reported IP may be the IP of your ISP's transparent proxy server. If you want the IP of your NAT box, you need a what-is-my-IP where the response is delivered over HTTPS.


Presumably using Google via https would do the trick, e.g. https://www.google.com/search?q=what+is+my+ip&ie=UTF-8&#...


You can proxy https. See RFC2817 section 5.

-molo


This seems like a case of some things being features, not applications. Entire web sites build just to report your IP back were probably going to be replaced by one thing or another, eventually.

Both Google and Apple (and most other companies) are smart enough to see that if a simple feature is heavily used and the experience of using it can be improved for their users, they may want to make it a "native" part of their products. Let's face it, this is a better experience for that search, and you can still go to the indie sites if what you need isn't covered by it.


Up next: What ports do I have open?



I've always used ShieldsUp![1]; I remember using it before I even had my own computer!

[1]: https://www.grc.com/x/ne.dll?bh0bkyd2



For those not in the know, above link is NSFW.


Waiting for them to support IPv6. That will be fun..


Just "ip" works as well.


Doesn't work for me :|

http://imgur.com/t9jA6


Looks like it's only active on .com


And on .co.uk. Probably something to do with local data centres


Or that IP could mean anything in languages other than english.


If your site is so sparse that Google can ruin you just by handling a search query, your business model was broken or non-existent. There must be something they can do with all that traffic data to differentiate. Where's the aggregate statistics?

Any of the bigger ones could spring off into an ISP review site.


Ok, so I have a curl/awk one-liner that can get me my ip in shell scripts that uses checkip.dyndns.org. It's super simple because the results are super simple from checkip.

Anyone want to take a stab at this for google's result page?


This works, but only accidentally:

    curl --silent 'http://www.google.com/search?q=what+is+my+ip' | sed 's/.*Client IP address: //;s/).*//;q'
Google responds with HTTP error 403 (Forbidden), but it just so happens the client IP address is in the error page.


haha, nice one


Even simpler:

    curl icanhazip.com


also,

    http://myip.dnsomatic.com
    http://whatismyip.org



If your use-case is from ssh'ing in a remote box, this may be simpler:

  #!/bin/sh
  # example from `who - u`:
  #nick     pts/0  2011-07-20 20:44 . 7856 (xxxxxxx.xxxxxxxx.internode.on.net)

  who -u | awk 'BEGIN {FS="[p.]"} /internode/ {print gensub("-",".","g",$6); exit}'
You might need to play around with gensub(...). Sometime `who` reports the IP as xxx-xxx-xxx-xxx and sometimes as xxx.xxx.xxx.xxx


I prefer 'curl ifconfig.me'


One way:

    wget -Ufoo -qO- 'http://www.google.com/search?q=ip' |
    sed -n '/.*Your public IP address is [^0-9]*\([0-9.]*\).*/{s//\1/p;q;}'


Google really doesn't it like it when you script their search. Better to use one of the many, many services designed for this purpose. Or set one up yourself in roughly one line of code.


True, but the OP asked explicitly for it and no one else seemed to answer that question.




For months... what? This is what it shows me, here in my studio apartment in London:

http://i.imgur.com/uXBJk.jpg

Edit: I knew that IP looked familiar - this is likely because of the Modify Headers Firefox add-on. Oh well, still broken.


how would a modify headers add-on be able to let the server think that you are coming from a different address? It's not as if the browser sends the origin address as a HTTP header.

It doesn't have to. It's part of the IP packet which contains the TCP packet which contains the request headers.

Are you sure that you are not using a proxy server at the address Wolfram gives you?

Edit: On second thought, you could try to fool server-side detection by setting a non-standard X-Forwarded-For header, but a what is my ip service shouldn't trust that and just report the real remote address.


Yup, non-standard X-Forwarded-For header here (thank you, Comedy Central!). Clearly not to be trusted by an IP finding service :)


Wow, like the IPv6 anf IPv4 breakdown along with ISP information. Wolfram would win, but as usual you can't scrape it with the SED tricks of earlier posts... or can you?


Actually W|A always have the result available in alt tag of the image:

    alt="IPv4 | 124.120.*.*\nIPv6  (short version) | ::ffff:*:*\n(as seen by Wolfram|Alpha)" title="IPv4 | 124.120.*.*..."
So Sed still works ;)


And thus one line of code kills a dozen websites.


Not particularly valuable ones, at least.


If there's already a dozen, they can probably handle the competition.


I recently noticed that searching for dictionary words, using the old define:something trick or queries like "ubuntu release day", "evanscence genre" returns related information or 'best guess'. Nifty.


I'm slightly amazed at how inconsistent these special queries work. For international users (I simply assume it's not just me), this trick only works if I add &hl=en to the URL. Any explanations?


They haven't yet rolled it out to all the localised versions.


And yet another search vertical killed by google's own results. At least they are not scraping the result this time, so nothing to blame.


I prefer http://ifconfig.me. It tells more information than just IP address.


Now just need something of the form: 1262307721 to date, that and ip are my 2 main lazy uses of Google.


Plug in "unix date 1262307721" to Wolfram Alpha?


Do you know of

    date -d @1262307721


Google can also do currency conversions for you http://tinyurl.com/6zzoqmt


Don't use shortened URLs here, please. People like to know where they're going ;) Especially since trolls use them to get people on goatse pages.


I'm sure "where am I" is next


try "my ip"


Just trying out some other features type "time" into the address bar in chrome Returns: 8:44am Wednesday (PDT) - Time in Vancouver, BC


Someone asked me what day Thanksgiving falls on in 2012; I just realized I could type "thanksgiving date 2012" and get the answer.


sad day :(


the ipchicken is not happy. Google kills yet another industry!


It's also a great news for Malware too as they usually check for their remote IP. But maybe that will be another way of Google to detect if the local machine is infected in a near future.


Malware usually opens a reverse (TCP) connection and thus does not require the remote IP of the infected machine. It only needs to know the IP or domain name of the server it wants to communicate with.


Regularly reversing malware samples, we still see many malware getting their respective remote IP from remote services. This is even used by some recent malware to update the bootstrap DHT with their own IP... In such case, they don't even need to contact directly the C&C.

I don't get why my previous comment is down-voted ;-)


ShieldsUP! - a free service from Gibson Research Corporation - will tell you your IP address and a whole lot more: https://www.grc.com/x/ne.dll?bh0bkyd2




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: