domain and rDNS data not matching - reverse-dns

When I search something on google.com, I see interaction with the following IP address: 172.217.7.132
But when I attempt to reverse lookup the ip address, I get iad30s08-in-f132.1e100.net. and iad30s08-in-f4.1e100.net., not google.com.
What do I need to do in order to correctly identify that this IP address is resolved by google.com.
EDIT
Clarifying the question: My problem is not specific to google.com. I want to programmatically/logically arrive at google.com because that's what my browser requested for.
Same problem exists in the case of amazon: The IP address it resolves to, on reverseDNS gives me: server-13-32-167-140.sea19.r.cloudfront.net. instead of amazon.com
Code for performing reverse lookup:
In [1]: def reverse_lookup(ip_address):
...: from dns import reversename, resolver
...: domain_address = reversename.from_address(ip_address)
...: return [answer.to_text() for answer in resolver.query(domain_address, "PTR")]

As others have mentioned, 1e100.net does, in fact, belong to google. Their reverse DNS is going to resolve to whatever they want it to resolve to, and there's not much you can do about that.
Depending on your requirements, another alternative may be using a geolocation database to gather more information about an IP. You can find a demo of this here:
https://www.maxmind.com/en/geoip-demo
(enter your example address 172.217.7.132 in the form)
MaxMind has various products (some free, some commercial), so one of them may fit your needs of being able to look up this info programatically.
A different possible solution would be to get access to a WHOIS API, such as:
https://hexillion.com/whois
Example results:
https://hexillion.com/samples/WhoisXML/?query=172.217.7.132&_accept=application%2Fvnd.hexillion.whois-v2%2Bjson

https://support.google.com/faqs/answer/174717
1e100.net is a Google-owned domain name used to identify the servers in our network.
Following standard industry practice, we make sure each IP address has a corresponding hostname. In October 2009, we started using a single domain name to identify our servers across all Google products, rather than use different product domains such as youtube.com, blogger.com, and google.com.
Typically, you will get a 1e100.net result when you do a reverse lookup on one of their IPs. Consider it as good as a google.com result would be - you've verified that the IP is controlled by Google if you see it.
One exception to this is the Googlebot crawler, which may return google.com or googlebot.com results. (I would expect this to eventually get moved over to 1e100.net in the future.)

Related

How to Find Specific Network Computer Information

I did lookup on StackOverflow and Googled, but did not find any code that can help me on this.
Request help here on this please.
We have a network with many computers. I would want to enter the name of a computer and should be able to get back the OSArchitecture, IPAddress and Full Computer Name.
I want to achieve this using VB.net
I tried using the "My.Computer.Name" and related options, but it gives me details of my computer only, I would to query the details of a specific computer on the network.
Note: This is a domain controlled network, not requesting for Home Workgroup
Getting the IP addresses is straight forward:
Dim ips As IPAddress[]
ips = Dns.GetHostAddresses(Dns.GetHostName())
The other information you could get through WMI

Serving IP Country based content, Subdomains and Google

I am designing a pretty big website that will target it's industry on a global level. The site is detecting IP address countries in order to serve content relative to the visitor's country. Basically alot of content will be restricted to visitors in a given country.
The concern I have is that Google doesn't seem to pay too much attention to IP based content, as I read here. They seem to think Google might implement better support for crawling IP based content but aren't sure when and the article is dated Nov 2011.
As a result, I have been considering ways to have Google crawl the site's IP content by country codes like us.site.com or site.com/us still detecting the visitor's country by IP and redirecting to the appropriate location. Im not sure if it's just because I am a little strange at times, but I seem to feel that the subdomain us.site.com seems tidier.
Considering that Google spider ALSO seems to ignore subdomains when there is considerable duplicate content (which may be the case because alot of the content is internationally available), what would you guys recommend?
Should I
Stop being so darn OCD about us.site.com and use site.com/us?
Use subdomains because perhaps while the spider ignores duplicate
content on sub-domains, it won't if there are more unique results?
What about lists of results on my site? Like a category page?
Take a gamble and stick to IP detection only, not using country
codes in the URL and hope for the best that Google will recognise
different content being served on different IP ranges
Thanks in advance
Ok, so i found this which is so far the best explanation I have found, any pointers please feel free to comment

weebly : A record Mapping

I want to know how is this done. I make a site at weebly, ( it's a sitebuilder).
I get a site xxx.weebly.com
If I want my custom domain name, I set A record of custom domain name to point to server : 199.34.228.100
Question is, how that default application(on 199.34.228.100) works which takes my domain name and show the content of the site to me?
Suppose your custom domain name is 'mysite.com'. At weebly, you set the A record to 199.34.228.100 which is like saying 'when someone wants to access 'mysite.com' I want them to be sent to 199.34.228.100.
This information is given to all the dns servers around the internet over the next few hours but can sometimes take longer. Afterwards, whenever a request is sent out for 'mysite.com' it will be mapped to 199.34.228.100.
This is weebly.com and when the request arrives, it will come with information saying that the original request was for 'mysite.com'. Weebly then looks in it's records to see who wanted that to happen, see that you made the change and knowing that you have xxx.weebly.com, show that site.
I hope that helps
This process is called domain forwarding to external IP address.
The information about redirection is to be set in following order:
1)
first at A record - this information means that all internet traffic at "yourdomain.com" should be forwarded to weebly static IP address (one of several provided by weebly)
2)
make changes in weebly panel to configure your web page - entering "yourdomain.com" as main url
http://kb.weebly.com/domain-registrar.html
best,
Peter

static or dynamic ips

I run this site and I approve access for a section of the site for people. I only want to approve static ips. If i have a bunch of IPs how do I find out if they are static or not? I can do the remaining parts but there is probably some function in the socket library or something that lets me script the part to find if the users are using static or dynamic IP.
thanks !
Php/Js would work too.
There is no way to inherently tell if an IP address is static or dynamically assigned. Based on the hostname that the IPs resolve to, you could probably make a guess as to whether they are static or not, but there is nothing definitive to facilitate this.
You could use the socket module to resolve the IPs to hostnames and flag them as "static" or "dynamic" based on some kind of "best guess" algorithm, but it would be only that: a best guess.
Here is an example using a random Verizon FiOS IP address. This assumes that any IP starting with "pool" is dynamically assigned.
>>> hostname = socket.gethostbyaddr('71.243.222.111')[0]
>>> if 'pool' in hostname:
... print hostname, 'is dynamic'
...
pool-71-243-222-111.lsanca.fios.verizon.net is dynamic
You're going to have a very tough time determining all of the various naming conventions and this would in no way be a complete solution.
You might want to ask yourself what kind of problem you're trying to solve first, and whether filtering access by IP address is providing the kind of verification you need.
I'd use a pragmatic solution: New accounts have a trial phase of a few days. After that they can only log in from the same IP used to sign up. If they still have that same IP it's most likely static.
Well, you don't have a problem, do you? If they ask for access from IP X, you give them access from IP X. If it turns out that it was dynamic and they switch, they no longer have access. In practice, no access from dynamic IPs :)
Seriously though, the authority on IP assignment type is the host from which the user is accessing. Thus, you need to ask the user what it says in his/her config.

What's the best way to test a site which displays differently depending on the client location?

I am using an IP location lookup to display localised prices to customers depending on whether they are visiting from the UK, US or general EU and defaulting to the US price if the location can't be determined.
I could easily force the system to believe I'm from a specific country for testing but still there is no way of knowing for sure that it's displaying correctly when a visitor from abroad accesses my site. Is the use of some proxy the only viable way of testing a site like this? If so how would I go about tracking down one that I can use to test my site from various countries of origin?
You should be able to achieve that by using proxies. http://www.proxy4free.com/page1.html has a bunch. That site just came from a Google search; I've never used proxies like this before though, so there may be better sites out there.
This is not about how to test, but rather how you identify your visitors.
Instead of using IP-lookup to determine their geographical location, you should instead grab the information about the locale they use from the useragent string.
F.instance, I'm a norwegian, and when I go to useragent.org I see that my browser sends "nb-NO" as the language my machine uses.
You can easily use that to customize currency, dates etc on your site.
If the website is indexed in Google's cache, you can visit the google with the proper URL address. ex. http://www.google.co.uk/
And see if it's displaying properly in the cache.
#Frode:
Checking system locale in iseragent string might be misleading.
I go to Canada, and set my system locale as French. So it might show the user EU prices as opposed to showing US price. Many such cases are possible where locale wont give accurate info about the end users desired "price class" in this particular application mentioned.
=AD
If you want to use geo-ip location to detect a user's language, using a proxy probably is the best way to do so.
There are a lot of lists of open proxies on the web, mostly listed with the countries. Google has quite a lot of search results on this topic. Of the top results, I have used SamAir to test some stuff before.
Searching for a working open proxy with an acceptable speed in the correct country can be a tedious task. Also keep in mind that you should not use any these proxy servers to submit any sensitive data, because you never know who runs them. This could be a kinda trustworthy ISP (ie. not from GB ;D), a honeypot to collect data, or an illegal open proxy hosted by some trojan.