Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Sites Hosted by IP

  1. #1
    Join Date
    Dec 2011
    Beans
    31

    Sites Hosted by IP

    Hello,

    I'm not sure if this belongs here but Ive been trying to figure out a script to find the sites hosted by a certain IP-address, i think it should be possible, but i can't seem to find a way to do this... anyone with any experience in this??

    it would be just like http://sameip.org

    this can be in a bash or PHP or whatever is the best way to do this.

    Thanks in advance!

    Tobias
    Last edited by the1joker; September 5th, 2012 at 03:10 PM.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,054
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Sites Hosted by IP

    You mean you want to find all the sites on a server using name-based virtual hosting that share the same IP address? I don't think that is possible at all. Reverse DNS will only tell you the hostname associated with the IP address, but there could be hundreds of sites using that address. Name-based hosting just matches the server name specified in a URL against a list of server definitions and returns the matching content. You'd have to know at least the domain names of the sites you want to list.

    And, frankly, as someone who hosts name-based sites I wouldn't want you to be able to do this either. Why, for instance, should I give you a list of my clients?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Sites Hosted by IP

    You could do it this way:

    find as much URLs / FQDNs as you can.
    Use "host <FQDN>" to find out the IP address
    Create a database of all FQDN's pointing to the same IP address

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,054
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Sites Hosted by IP

    Well, sure, but how you even know where to begin? If you had an existing list of URLs and wanted to know whether they shared a common server, your method would work. Otherwise you are just shooting in the dark.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Sites Hosted by IP

    Quote Originally Posted by SeijiSensei View Post
    Well, sure, but how you even know where to begin? If you had an existing list of URLs and wanted to know whether they shared a common server, your method would work. Otherwise you are just shooting in the dark.
    Just begin, and you can cover all (and thus it's not shooting in the dark).

    According to http://www.whois.sc/internet-statistics/ and http://www.daniweb.com/web-developme...mes-are-there# there seem to be about 250.000.000 domains. If the script / robot can handle 100 domains per second, it will take 250.000.000/100 seconds to create the whole database. That's less than a month (29 days to be precise: (250 000 000 / 100) / (3600 * 24) = 28,9351852). So that sounds feasible to me (assuming the OP really wants to have this information).

    From that moment on the OP will have a very unique and valuable database.

  6. #6
    Join Date
    Dec 2011
    Beans
    31

    Re: Sites Hosted by IP

    @ SeijiSensei

    It is possible, like on the example site i posted, i want exactly that.

    @ SanderJ

    i have tried that too, but there is something you are overlooking, how do you get the FQDNs if you don't know what they are, i randomly can genereate them, but by my calculation if i randomly create webaddresses, with all existing extensions, it would take my server about 300 years to scour the internet and then ping all those if they actually resolve to a address.

    Therefor i want to use IP's, they are limited and therefore can be much easier put into a loop and then put all sites hosted on that IP into the database.

  7. #7
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Sites Hosted by IP

    I'm not sure why you would want to do this. If the websites are on a webserver that you're responsible for, wouldn't it be quicker and eaiser to look in the configuration files, e.g. apache's "sites available"??????
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.
    Please use CODE tags.
    A low-volume blog

  8. #8
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Sites Hosted by IP

    Quote Originally Posted by the1joker View Post
    @ SanderJ

    i have tried that too, but there is something you are overlooking, how do you get the FQDNs if you don't know what they are, i randomly can genereate them, but by my calculation if i randomly create webaddresses, with all existing extensions, it would take my server about 300 years to scour the internet and then ping all those if they actually resolve to a address.

    Therefor i want to use IP's, they are limited and therefore can be much easier put into a loop and then put all sites hosted on that IP into the database.
    I've written and used such a robot/script to find IPv6 enabled websites. I used Google to find FQDN's: just feed Google one or two random words, and request 100 (or 1000) search results from Google. So ... that's a way to find FQDNs. And you're probably only interested in domains, which is a subset of FQDNs, so that's easier.

    Please be aware that there are more IPv4 address (about 4 billion) than domains (250 million).


    But anyway: I have the feeling that you're looking for an easy way to go from IP address to hosted domains. And that does not exist.

  9. #9
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Sites Hosted by IP

    Quote Originally Posted by sanderj View Post
    Just begin, and you can cover all (and thus it's not shooting in the dark).

    According to http://www.whois.sc/internet-statistics/ and http://www.daniweb.com/web-developme...mes-are-there# there seem to be about 250.000.000 domains. If the script / robot can handle 100 domains per second, it will take 250.000.000/100 seconds to create the whole database. That's less than a month (29 days to be precise: (250 000 000 / 100) / (3600 * 24) = 28,9351852). So that sounds feasible to me (assuming the OP really wants to have this information).

    From that moment on the OP will have a very unique and valuable database.
    Your maths doesn't look very convincing to me, you're making some massive assumptions here.

    For a start, you don't actually have a list of valid domain names to parse. Because of this you would have to iterate through all possible domain names to find out which existed and which didn't.

    Some quick 'back of a beer mat' calculations of mine follow...

    There are 37 valid characters in a domain name (a-z, 0-9, -).
    Domain names (not including the TLD suffix) can be anything up to 36 characters.
    There are currently around 280 TLD's.

    This gives you roughly 37^36 x 280 = 8 x 10^58 possible domain names.

    Even if you could resolve 100 domains per second (which is doubtfull), then you are still looking at around 2.5 x 10^49 years to process all of the available domains (which is millions of times larger than the age of the universe).

    Even if you could attempt this then your list would be massively out of date before you even made a dent into this number because of old domains that weren't renewed as well as new domains that are being registered. Also I haven't accounted for domains that are using a dynamic IP or even started thinking about sub-domains.
    Cheesemill

  10. #10
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Sites Hosted by IP

    Quote Originally Posted by Cheesemill View Post
    Your maths doesn't look very convincing to me, you're making some massive assumptions here.

    For a start, you don't actually have a list of valid domain names to parse. Because of this you would have to iterate through all possible domain names to find out which existed and which didn't.
    I have the idea you didn't read my post I posted 30 minutes before your post.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •