bind 9.3.2 linux utilities

Mark Andrews Mark_Andrews at isc.org
Thu Oct 30 21:53:24 UTC 2008


In message <gecai9$hql$1 at ger.gmane.org>, Chris Hills writes:
> On 30/10/08 13:25, James M wrote:
> > helpful..thanks..ideally i would like cname info for one host rather than
> > the entire domain.
> > but I think I can make it work.
> > how does one go about requesting improvements - i.e. a new parameter for di
> g
> > to return cname for given host?
> 
> host -l -t cname zone.example | grep myserver

dig axfr <zonelist> |  tr '[A-Z]' '[a-z]' | awk '$4 == "CNAME" && $5 == "myserver."'

With perl you could collaps the tr and awk commands into one command.

If you have a really large zone list you could put it in a file and have
named read it.

dig axfr -f zonelist |  tr '[A-Z]' '[a-z]' | awk '$4 == "CNAME" && $5 == "myserve."'

Note: this does not cover CNAME -> CNAME.

Mark
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at isc.org


More information about the bind-users mailing list