reverse dns

S

sihyung

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

axel

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
 
J

John Bokma

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?
 
U

Uri Guttman

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
 
J

John Bokma

Uri Guttman said:
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.
 
B

Ben Morrow

Quoth John Bokma said:
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
 
P

Peter J. Holzer

Quoth John Bokma said:
Uri Guttman said:
JB> (e-mail address removed) wrote:
(e-mail address removed) 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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top