bind 9.3.2 linux utilities
Danny Thomas
d.thomas at its.uq.edu.au
Wed Oct 29 22:34:04 UTC 2008
James M wrote:
> anyone know of a command that will return all cname's for a given host?
> or
> is there possibly an api (perl or php) to do the same?
> thanks
>
>
this can only be done by looking at all your dns records
one set comes from A records to an ip-address
CNAME chains need to be followed
we run a locally developed script several times a day which downloads
all zones
and produces a set of web-pages including
* records pointing outside our site
* ip-addresses having multiple names (either A or CNAME)
In fact a file is produced with a line for each ip-address
130.102.152.7: im-ntp.its.uq.edu.au,NTP0.UQ.EDU.AU
the first name taken from PTR, other names capitalized when CNAME
* CNAME chains, sorted by length
* a page for each name-server mastering zones listing
errors/warnings/policy-issues
when all dns comes from a system with a database backend
that system could provide such functionality without directly querying
the dns.
of course there's no way to know if there's A or CNAME records
outside the dns we master/secondary.
Danny
More information about the bind-users
mailing list