-5

When I resolve google.com I get the following ip addresses

Name:    google.com
Addresses:  2607:f8b0:4006:80b::1006
      173.194.123.6
      173.194.123.0
      173.194.123.8
      e.t.c

However when I pick an ip address from the list and perform reverse lookup on it I get this

Name:    lga15s46-in-f6.1e100.net
Address:  173.194.123.6

I am trying to find a way where I can resolve the ip address 173.194.123.6 directly to google.com. I have a list of ip addresses that I am trying to resolve to domain names, but I am running to this issue.

If someone can give me any ideas that would be helpful in tackling this issue.

Reaces
  • 5,547
  • 4
  • 36
  • 46
Le Ray
  • 113
  • 1
  • 3
  • Why are you trying to do this? What is the actual problem you are trying to solve? – Michael Hampton Jul 07 '15 at 19:02
  • I am analyzing some web requests that contain dst server ip addresses so i need to know which domain the destination server belongs to, but reverse lookup doesnt seem to help the cause. – Le Ray Jul 07 '15 at 19:07
  • 3
    The servers that host the forward lookup zones can be (and most of the time are) totally different from the ones that host the reverse lookup zones. The reverse lookup is unlikely to help you much. You could do an IP whois at www.arin.net and that might help. – Todd Wilcox Jul 07 '15 at 19:08

2 Answers2

2

For above example of google you can do:

curl -sI 173.194.123.6 | grep "Location:" | awk '{print $2}'

But you can't do anything if the domain is virtually hosted or behind the firewall.

Mr. Pundir
  • 226
  • 2
  • 3
1

Unfortunately, you're out of luck. Forward and reverse lookups are separate pieces of information, published in separate zones by their respective owners. They contain exactly that which their owners want them to contain, and nothing more. If Google has chosen not to publish the name "google.com" in their reverse lookup zones, there is nothing you can do about it.

If it helps, ponder this example: you take a domain of your own and publish an A record with one of Google's IP addresses in it. If you tell your browser to go to the name you used, you'll end up at Google's server. But there is no way for Google to know what you did, so they couldn't have put your name in their reverse zone even if they wanted to. Conceivably, you could contact them and ask them to add your name, but that is a solution way outside the technical scope.

Calle Dybedahl
  • 2,083
  • 12
  • 17