CNAME logging

Mark Andrews marka at isc.org
Wed Nov 9 02:43:31 UTC 2011


In message <4EB9E275.6010705 at waikato.ac.nz>, Mike Vallabh writes:
> Hi,
> 
> Is it possible to find out whether or not a CNAME is being used?
> I'm using BIND 9.2.2-P1 and am currently logging everything I can think of.
> 
> logging {
>    channel everything {
>            file "/tmp/named_messages";
>            severity debug 1;
>            print-category yes;
>            print-severity yes;
>            print-time yes;
>           } ;
> 
>          category default  {everything; };
>          category queries  {everything; };
>          category lame-servers { null; };
> }
> 
> We literally have hundreds of CNAME records and I am trying to remove 
> all the ones no longer required.
> I realise I could just remove them and see what breaks but that wouldn't 
> be very friendly.
> 
> Cheers,
> Mike Vallabh

Turn on query logging and extract the query names.  Extract the
owner names of the CNAMES records from the the zones.  Find the
common set of names.  Next find the target names of those CNAME and
extract them from the remaining CNAMES.  Repeat until you have no
more new CNAME matches.  Whatever is left was not looked up during
the sample period.

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



More information about the bind-users mailing list