Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I determine which company an IP address belongs to?

Tags:

.net

dns

whois

I'm trying to programmaticaly determine the company* associated with a given IP address.

My first guess was this :

  string hostname = Dns.GetHostEntry(IPAddress.Parse(ip)).HostName;

but this won't work if the reverse DNS isn't set correctly, which seems to happen 90% of the time.

However some websites are still able to successfully determine the company associated with a specific IP even if the reverse dns fails. For example, on this site, the ISP Provider field sometimes contains valuable information (ie the name of the company) even if the hostname isn't set.

What's the easiest way to achieve the same thing using .net ?


Notes :

  • I don't need a canonical name. ie MS or Microsoft are both ok.
  • I'm targeting big companies, which are likely to "own" their IP address ranges.
  • I'm running on Windows, so unix's whois tools are not installed by default.

Edit regarding the use of whois : Sometimes, there's no whois information associated with an IP

like image 950
Brann Avatar asked Jun 23 '09 13:06

Brann


People also ask

How do I find out what company owns an IP address?

To find an owner of an IP address, you'll use ARIN WHOIS lookup tool to query an IP address. Much like the domain WHOIS lookup, the ARIN WHOIS lookup will provide the details of Network, Organization, and Contact information.

Can you tell a company by IP address?

Absolutely! Thankfully, there is a way that you can identify those website visitors by turning an IP address into company information. You can find the company and contact information for businesses that have visited your site as long as they have a public IP address.


1 Answers

You can install the whois command line tool for windows from microsoft

edit: then what information are you looking for ?

>whois bbc.co.uk
Domain name:
    bbc.co.uk

Registrant:
    British Broadcasting Corporation

Registrant type:
    UK Limited Company, (Company number: 000057)

Registrant's address:
    Research & Development
    Kingswood Warren
    Tadworth
    Surrey
    KT20 6NP
    United Kingdom

Registrar:
    British Broadcasting Corporation [Tag = BBC]
like image 189
Martin Beckett Avatar answered Sep 19 '22 20:09

Martin Beckett