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

Matus UHLAR - fantomas uhlar at fantomas.sk
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:
> 
> vserver09.tamay-dogan.net.  604800  IN A        88.168.69.36
> 
> www.can4linux.org.           86400  IN CNAME    vserver09.tamay-dogan.net.
> www.fexray4linux.org.        86400  IN CNAME    vserver09.tamay-dogan.net.
> 
> 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 fantomas.sk ; http://www.fantomas.sk/
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