'Reverse IP Domain Check?

There is a website which you can query with a domain and it will return a list of all the websites hosted on that IP. I remember there being a method in C# that was something like ReturnAddresses or something of that sort. Does anyone have any idea how this is done? Quering a hostname or IP and having returned a list of hostnames aka other websites hosted on the same server?

the website is: http://www.yougetsignal.com/tools/web-sites-on-web-server/



Solution 1:[1]

Jeremy's answer is based around Reverse DNS, which is the normal programmatical way to look up IP->hostname. It relies an a PTR record being set up for that server; this is often but not always set up to something useful.

For example look up, thedailywtf.com and you'll get 74.50.106.245, but since there is no PTR record for “245.106.50.74.in-addr.arpa”, Dns.GetHostEntry() won't return anything useful.

Similarly, many server farms will just give you a generic hostname like 123.45.67.89-dedicated.bigexamplehost.com.

What yougetsignal is doing is different, it's “Passive DNS Replication”. They run some DNS servers people are querying, and remember every hostname that was looked up. Then you can query their records of past lookups by the address that was returned. Put 74.50.106.245 into yougetsignal and you'll get a list of hostnames that previously resolved to the dailywtf server when people queried them, not anything to do with the Reverse DNS PTR entry.

Solution 2:[2]

Reverse DNS is not as same as what you asking (which sites hosted on the same server). Reverse DNS generally won't work as you expect (see bobince's answer).

To able to identify other websites in a host, you need to build a massive database and store as much as DNS record as you can, then correlate IP addresses.

Check out : http://www.domaintools.com/reverse-ip/

They are doing this as the way I said, that's only way to get an accurate results. Obviously it takes time, CPU, bandwith and space to correlate and crawl/generate that data.

Solution 3:[3]

GetHostByAddress has been deprecated. Use GetHostEntry instead

read this article for more

 IPHostEntry entry = await Dns.GetHostEntryAsync(iPAddress);
 if (entry != null)
 {
     return entry.HostName;
 }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 bobince
Solution 2 dr. evil
Solution 3 Akbar Asghari