reverse dns

Discussion in 'Perl Misc' started by sihyung@gmail.com, Aug 18, 2006.

  1. Guest

    Does anybody know how to perform a reverse dns that returns the number
    of domains associated with a certain IP? Thanks
    , Aug 18, 2006
    #1
    1. Advertising

  2. Guest

    wrote:
    > Does anybody know how to perform a reverse dns that returns the number
    > of domains associated with a certain IP? Thanks


    No.

    DNS does not work that way... hint... domains do not have IP numbers.

    Now go away unless you have a something Perl related to say.

    Axel
    , Aug 18, 2006
    #2
    1. Advertising

  3. John Bokma Guest

    wrote:

    > wrote:
    >> Does anybody know how to perform a reverse dns that returns the number
    >> of domains associated with a certain IP? Thanks

    >
    > No.
    >
    > DNS does not work that way... hint... domains do not have IP numbers.


    What the OP means (guess) is that for a given IP address he wants to
    get a list of all domains that are hosted on that address.

    The Perl question could be, which CPAN module can be used to accomplish
    this. Net::DNS maybe?


    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
    John Bokma, Aug 18, 2006
    #3
  4. Uri Guttman Guest

    >>>>> "JB" == John Bokma <> writes:

    JB> wrote:
    >> wrote:
    >>> Does anybody know how to perform a reverse dns that returns the number
    >>> of domains associated with a certain IP? Thanks

    >>
    >> No.
    >>
    >> DNS does not work that way... hint... domains do not have IP numbers.


    JB> What the OP means (guess) is that for a given IP address he wants to
    JB> get a list of all domains that are hosted on that address.

    JB> The Perl question could be, which CPAN module can be used to accomplish

    why even use a module? the getXXbyXX functions support basic reverse dns
    lookups.

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
    Uri Guttman, Aug 18, 2006
    #4
  5. John Bokma Guest

    Uri Guttman <> wrote:

    >>>>>> "JB" == John Bokma <> writes:

    >
    > JB> wrote:
    > >> wrote:
    > >>> Does anybody know how to perform a reverse dns that returns the
    > >>> number of domains associated with a certain IP? Thanks
    > >>
    > >> No.
    > >>
    > >> DNS does not work that way... hint... domains do not have IP
    > >> numbers.

    >
    > JB> What the OP means (guess) is that for a given IP address he
    > wants to JB> get a list of all domains that are hosted on that
    > address.
    >
    > JB> The Perl question could be, which CPAN module can be used to
    > accomplish
    >
    > why even use a module? the getXXbyXX functions support basic reverse
    > dns lookups.


    Tested this, but it doesn't return virtual hosts on a given IP address. No
    idea if Net::DNS suffers from the same problem.


    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
    John Bokma, Aug 18, 2006
    #5
  6. Ben Morrow Guest

    Quoth John Bokma <>:
    > Uri Guttman <> wrote:
    >
    > >>>>>> "JB" == John Bokma <> writes:

    > >
    > > JB> wrote:
    > > >> wrote:
    > > >>> Does anybody know how to perform a reverse dns that returns the
    > > >>> number of domains associated with a certain IP? Thanks
    > > >>
    > > >> No.
    > > >>
    > > >> DNS does not work that way... hint... domains do not have IP
    > > >> numbers.

    > >
    > > JB> What the OP means (guess) is that for a given IP address he
    > > wants to JB> get a list of all domains that are hosted on that
    > > address.
    > >
    > > JB> The Perl question could be, which CPAN module can be used to
    > > accomplish
    > >
    > > why even use a module? the getXXbyXX functions support basic reverse
    > > dns lookups.

    >
    > Tested this, but it doesn't return virtual hosts on a given IP address. No
    > idea if Net::DNS suffers from the same problem.


    Well... yes. DNS Doesn't Work Like That. Given an IP address, all you
    can do is look it up in .in-addr.arpa., in which case what you get is at
    most one PTR to (if you're lucky) the canonical hostname for that
    address.

    The only way to find all the hostnames that resolve to a given ip is to
    trawl the *whole* of the DNS and grep out the appropriate entries. Not
    something I'd recommend trying... :)

    Ben

    --
    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.
    Groucho Marx
    Ben Morrow, Aug 19, 2006
    #6
  7. On Sat, 19 Aug 2006 00:03:55 +0100, Ben Morrow wrote:
    > Quoth John Bokma <>:
    >> Uri Guttman <> wrote:
    >> >>>>>> "JB" == John Bokma <> writes:
    >> > JB> wrote:
    >> > >> wrote:
    >> > >>> Does anybody know how to perform a reverse dns that returns the
    >> > >>> number of domains associated with a certain IP? Thanks

    [...]
    >> > why even use a module? the getXXbyXX functions support basic reverse
    >> > dns lookups.

    >>
    >> Tested this, but it doesn't return virtual hosts on a given IP address. No
    >> idea if Net::DNS suffers from the same problem.


    DNS doesn't have the concept of "virtual hosts" or "hosting" in general.
    It's just a hierarchical directory structure where every node may have
    some information (e.g., IP-addresses, texts, service information,
    location information, ...) associated with it.


    > Well... yes. DNS Doesn't Work Like That. Given an IP address, all you
    > can do is look it up in .in-addr.arpa., in which case what you get is at
    > most one PTR to (if you're lucky) the canonical hostname for that
    > address.


    Nope. The number of PTR records is not limited. For example,
    dig 2.20.130.143.in-addr.arpa. ptr
    returns three of them.

    But there is no guarantee that there is a corresponding PTR record for
    every A record - the correspondence exists only by convention, and it is
    infeasible in some situations (e.g., if thousands of FQDNs resolve to
    the same IP address, you don't want to return thousands of PTR records
    to every query).

    > The only way to find all the hostnames that resolve to a given ip is to
    > trawl the *whole* of the DNS and grep out the appropriate entries. Not
    > something I'd recommend trying... :)


    Doesn't work, since most most nameservers don't answer AXFR requests
    from untrusted clients anymore. I used to do that kind of thing for some
    of the smaller TLDs in the 1990's :).

    hp

    --
    _ | Peter J. Holzer | > Wieso sollte man etwas erfinden was nicht
    |_|_) | Sysadmin WSR | > ist?
    | | | | Was sonst wäre der Sinn des Erfindens?
    __/ | http://www.hjp.at/ | -- P. Einstein u. V. Gringmuth in desd
    Peter J. Holzer, Aug 19, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFuIE5hc2g=?=

    reverse DNS lookup

    =?Utf-8?B?RGFuIE5hc2g=?=, Oct 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    462
    =?Utf-8?B?RGFuIE5hc2g=?=
    Oct 14, 2004
  2. Madhur Ahuja
    Replies:
    1
    Views:
    746
    Paul Lutus
    Aug 29, 2004
  3. Tim Ward
    Replies:
    4
    Views:
    5,546
    Tim Ward
    Jun 12, 2006
  4. Sam Roberts
    Replies:
    0
    Views:
    209
    Sam Roberts
    Mar 20, 2005
  5. gavino
    Replies:
    2
    Views:
    166
    Ted Zlatanov
    Jul 27, 2006
Loading...

Share This Page