How to get easily (from a script) all CNAME of a A record?

Matus UHLAR - fantomas uhlar at
Tue Nov 9 13:13:47 UTC 2010

On 09.11.10 14:01, Michelle Konzack wrote:
> does someone know, how to get easily all CNAME records for a Host?
> For example I have:
>  604800  IN A
>           86400  IN CNAME
>        86400  IN CNAME
> So I have only the <vserver09> and want to know from a script the CNAMEs
> which mean, I need a revers search.
> How can I query this and which is the best (shell) tool?
> I mean, currently I have a spider script installed on the NS which I can
> run using 'ssh ${NS} query_script ${OPTS}' and on STDOUT I have  what  I
> need, but I like to get a better solution, since sometimes  it  dos  not
> work with DNSSEC and with more then 80000 Domains and more than 1million
> hosts I run into timing problems.

I am not sure whether dnswalk over whole internet can do that, but on your
server you can either run recursive grep over named data directory, or dump
the named dsatabase and grep it...
Matus UHLAR - fantomas, uhlar at ;
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
It's now safe to throw off your computer.

More information about the bind-users mailing list