5

I'm in the middle of moving our public facing internet site over to a new farm with a new set of IP Addresses. My site has several alias setup that point main site name. Some of the these alias are managed by the internal IT department and others are managed by external ISPs.

So I am wondering if there is a way to do a lookup against DNS using either the main site name or the IP Address to get a list of all the sites that are aliased to that site?

I'm a DNS noobie so please execuse me if I have the DNS terminolgy wrong.

5 Answers 5

2

There is a way to do this, but it is unreliable and requires a service provider to manage a database.

One example is at DomainTools

Basically, someone with access to lots of network traffic records domain name resolutions and aggregates them into a searchable database. This will only work with routable IP addresses, so if you are trying to do this on a large internal network, tools like this one will not help you.

Note that this is NOT comparable to a reverse DNS query. A reverse DNS query is RFC sanctioned functionality and there are many tools for performing those lookups. That is something to keep in mind when communicating your intentions to other network folks.

4

No, it is not possible. If I knew your IP I could easily add an A record to my zone pointing at your IP address and you would have no way of knowing I had done this.

I suspect what you may be able to do is enable logging on your server to get the hostnames that people are using to to connect. If that isn't an option perhaps you may need to setup a transparent proxy in front of the web server temporarily to log all requests. Most browsers these days will send the name they used to connect as part of the HTTP request. This is what allows name-based virtual hosting to work. Or you could even just run a network capture and just grab the requests to the server.

2
  • Agreed. An IP address can have at most one reverse lookup (PTR) record. This is the record that resolves an IP address into a hostname.
    – squillman
    May 28, 2009 at 17:58
  • 3
    Sorry, squillman, that's not true. You can have multiple PTR records for a single IP address. While it isn't recommended, it is allowed. May 28, 2009 at 19:00
0

It might be possible to contact the provider, ask to speak with an engineer, and explain the situation to them. They might be able to help you by pulling their records or configs for you to look at.

0

As people have already answered this approach won't work. However, with a webserver like Apache you might be able to achieve your goals by parsing out the domain name of the http request in your logs and then piping it to uniq then sort.

0

Yes, you can do this if you have the co-operation of both your Internal IT Department, as well as the external ISP that is hosting your DNS.

I think that you are describing a scenario in which you have zone files that look like the following:

Corporate IT for foo.com

internalwww         A     55.32.10.7
internalwww         A     55.32.10.8
internalwww2       CNAME  internalwww
othersitename      CNAME  internalwww

External ISP bar.com

externalwww       CNAME   internalwww.foo.com.
externalwww2      CNAME   internalwww.foo.com. 
differentsite     A       55.32.10.7

In which your web farm consists of the servers 55.32.10.7,55.32.10.8. You are about to migrate to a new webfarm, and you want to make sure that both the internal hosts are updated, as well as the external hosts.

If I have your scenario correct, then what you want to do is take a zone transfer of both foo.com and bar.com. This can be done with the commands:

dig @internaldnsserver.foo.com. axfr
dig @externaldnsserver.bar.com. axfr

Though, you'll need them to configure their DNS server to allow a transfer to the client you are making these requests from. Once you have these zone files, you'll want to use grep a few times to track down the appropriate hosts:

I.E.

egrep -i 55.32.10.7 externalzonefile internalzonefile
egrep -i internalwww externalzonefile internalzonefile

Etc...

Alternativey, you can provide the DNS Administrators for these servers the queries that you are interested in, and they can run them for you without having to bother about providing a full zone transfer, which, for administrative and security purposes, may be a problematic request to service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .