<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    PTR RRs benefit from label compression, whereas TXT records do not.
    Therefore I prefer PTR records for any such "metadata" references
    within DNS. There's no chance they'll be mistaken for, or conflict
    with reverse DNS records if they're not in the in-addr.arpa branch
    of the namespace.<br>
    <br>
                                                                       
                                                                       
                                                    - Kevin<br>
    <br>
    On 11/9/2010 4:16 PM, <a class="moz-txt-link-abbreviated" href="mailto:Philippe.Simonet@swisscom.com">Philippe.Simonet@swisscom.com</a> wrote:
    <blockquote
cite="mid:B7CABEA96AECDA4A806E6EA71C8F08E110D738281C@sg000004.corproot.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">Hi<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">If you have control over all zones,
            you could also pre-store the results of <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">your search in DNS </span><span
            style="font-size: 11pt; font-family: Wingdings; color:
            rgb(31, 73, 125);" lang="EN-US">J</span><span
            style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">For all CNAME records, make e.g. a
            TXT record with the reverse result : <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">(TXT is maybe not the better record
            type…which ones (for specialists))<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">For each : <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">a-name IN A 1.2.3.4<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">an-alias IN CNAME a-name<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">Just add : <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">a-name IN TXT an-alias<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">and make more than one TXT records
            for each cname pointing to the same record …<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">a-name IN TXT another-alias<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">best regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US">Philippe<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            "Calibri","sans-serif"; color: rgb(31,
            73, 125);" lang="EN-US"><o:p> </o:p></span></p>
        <div style="border-width: medium medium medium 1.5pt;
          border-style: none none none solid; border-color:
          -moz-use-text-color -moz-use-text-color -moz-use-text-color
          blue; padding: 0cm 0cm 0cm 4pt;">
          <div>
            <div style="border-right: medium none; border-width: 1pt
              medium medium; border-style: solid none none;
              border-color: rgb(181, 196, 223) -moz-use-text-color
              -moz-use-text-color; padding: 3pt 0cm 0cm;">
              <p class="MsoNormal"><b><span style="font-size: 10pt;
                    font-family:
                    "Tahoma","sans-serif"; color:
                    windowtext;" lang="EN-US">From:</span></b><span
                  style="font-size: 10pt; font-family:
                  "Tahoma","sans-serif"; color:
                  windowtext;" lang="EN-US">
                  <a class="moz-txt-link-abbreviated" href="mailto:bind-users-bounces+philippe.simonet=swisscom.com@lists.isc.org">bind-users-bounces+philippe.simonet=swisscom.com@lists.isc.org</a>
                  [<a class="moz-txt-link-freetext" href="mailto:bind-users-bounces+philippe.simonet=swisscom.com@lists.isc.org">mailto:bind-users-bounces+philippe.simonet=swisscom.com@lists.isc.org</a>]
                  <b>On Behalf Of </b>Stacey Jonathan Marshall<br>
                  <b>Sent:</b> mardi 9 novembre 2010 16:53<br>
                  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:bind-users@lists.isc.org">bind-users@lists.isc.org</a><br>
                  <b>Subject:</b> Re: How to get easily (from a script)
                  all CNAME of a A record?<o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">On 09/11/2010 14:14, Michelle Konzack
            wrote: <o:p></o:p></p>
          <pre>Hello Matus UHLAR - fantomas,<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>Am 2010-11-09 14:13:47, hacktest Du folgendes herunter:<o:p></o:p></pre>
          <blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
            <pre>I am not sure whether dnswalk over whole internet can do that, but on your<o:p></o:p></pre>
          </blockquote>
          <pre><o:p> </o:p></pre>
          <pre>I will try it...<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
            <pre>server you can either run recursive grep over named data directory, or dump<o:p></o:p></pre>
            <pre>the named dsatabase and grep it...<o:p></o:p></pre>
          </blockquote>
          <pre><o:p> </o:p></pre>
          <pre>This is what I currently do...<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>----[ '/usr/sbin/get_hosts_in cname' ]----------------------------------<o:p></o:p></pre>
          <pre>#!/bin/sh<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>QUERY="$1"<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>for FILE in $(cd /etc/bind && ls *.signed)<o:p></o:p></pre>
          <pre>do<o:p></o:p></pre>
          <pre>  grep --regexp=" IN CNAME .*${QUERY}" /etc/bind/${FILE} 2>/dev/null |cut -d ' ' -f1 |sed 's|.$||'<o:p></o:p></pre>
          <pre>done<o:p></o:p></pre>
          <pre>------------------------------------------------------------------------<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>...and it is to slow do to more then  80.000  Zones  (they  have  to  be<o:p></o:p></pre>
          <pre>greped all) number of VHosts.<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>Oh, it is now time to use "xargs", because I saw today, that I  hit  the<o:p></o:p></pre>
          <pre>limits for "ls".  :-D<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>Following is working:<o:p></o:p></pre>
          <pre>    cd /etc/bind && ls<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>but not:<o:p></o:p></pre>
          <pre>    cd /etc/bind && ls *<o:p></o:p></pre>
          <pre>or<o:p></o:p></pre>
          <pre>    cd /etc/bind && ls *.signed<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>and the OSes are called Linux and BSD...  WTF?<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>It seems that a commandline can not have more then 31.000 characters.<o:p></o:p></pre>
          <pre>(no not options but total lenght)<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>Thanks, Greetings and nice Day/Evening<o:p></o:p></pre>
          <pre>    Michelle Konzack<o:p></o:p></pre>
          <pre><o:p> </o:p></pre>
          <p class="MsoNormal">The asterisk causes the shell to expand
            the names and run ls with them as a single command, so in
            effect you have "ls file1 file2 file3 ...".   Try the
            following instead:<br>
            <br>
            <br>
            <o:p></o:p></p>
          <pre>cd /etc/bind<o:p></o:p></pre>
          <pre>for FILE in *.signed<o:p></o:p></pre>
          <pre>do<o:p></o:p></pre>
          <pre>  grep --regexp=" IN CNAME .*${QUERY}" ${FILE} 2>/dev/null |cut -d ' ' -f1 |sed 's|.$||'<o:p></o:p></pre>
          <pre>done<o:p></o:p></pre>
          <p class="MsoNormal">It might still have the same issue, but
            worth a go.<br>
            <br>
            I assume the command length is also why your not simply
            running "grep -h <expression> *.signed"?<br>
            <br>
            Stace<br>
            <br>
            <o:p></o:p></p>
          <pre><o:p> </o:p></pre>
          <pre><o:p> </o:p></pre>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>bind-users mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:bind-users@lists.isc.org">bind-users@lists.isc.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="https://lists.isc.org/mailman/listinfo/bind-users">https://lists.isc.org/mailman/listinfo/bind-users</a><o:p></o:p></pre>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
bind-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:bind-users@lists.isc.org">bind-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/bind-users">https://lists.isc.org/mailman/listinfo/bind-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>