<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 24, 2019 at 9:20 AM Andrey Geyn <<a href="mailto:andgein@yandex-team.ru">andgein@yandex-team.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi, Bob, thank you for response!</div><div> </div><div>What if I want to make following configuration (as an example):</div><div> </div><div><a href="http://domain.com" target="_blank">domain.com</a>    A    10.10.10.10</div><div>*.<a href="http://domain.com" target="_blank">domain.com</a>  CNAME    <a href="http://domain.com" target="_blank">domain.com</a></div><div> </div><div>I don't want to write 10.10.10.10 twice, I want to use magic of CNAME's here.</div></blockquote><div><br></div><div>Sorry, that is not how RPZ was designed to work.  </div><div>You can make the second one:</div><div>      *.<a href="http://domain.com" target="_blank">domain.com</a>  CNAME    <a href="http://my10.realdomain.com">my10.realdomain.com</a>.</div><div>Where there is a real domain (not the RPZ domain) with:</div><div>       <a href="http://my10.realdomain.com">my10.realdomain.com</a>. A  10.10.10.10<br></div><div><br></div><div>Or make them both "A" records.  Or both CNAME.  But one RPZ entry cannot point to another.</div><div>Use scripts to automate the process, if you don't want to enter 10.10.10.10 twice.</div><div><br></div><div>p.s.  The decision not to re-lookup the results of RPZ lookups is probably for speed and to avoid loops.  Trying to patch around that is not a good idea.</div><div><br></div><div>-- </div><div>Bob Harold</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div> </div><div>> Do you want <a href="http://cname.domain.com/" target="_blank">cname.domain.com</a> to point to 10.10.10.10?  Then use an A record to 10.10.10.10.</div><div>This sentence sounds like «CNAME are useless at all» :-). Do you want some domain to point to some address? The use an A record, not CNAME!</div><div> </div><div>Additionally, I already use patched version of BIND. Maybe it is possible to make some patch for allowing this behaivor?</div><div> </div><div>Andrey</div><div> </div><div>24.10.2019, 18:06, "Bob Harold" <<a href="mailto:rharolde@umich.edu" target="_blank">rharolde@umich.edu</a>>:</div><blockquote><div><div> </div><div><div>On Wed, Oct 23, 2019 at 10:34 AM Andrey Geyn <<a href="mailto:andgein@yandex-team.ru" target="_blank">andgein@yandex-team.ru</a>> wrote:</div><blockquote style="border-left:1px solid rgb(204,204,204);margin:0px 0px 0px 0.8ex;padding-left:1ex"><div>Hello, I would like to set up RPZ with CNAME and A. There are two options:</div><div> </div><div>1.</div><div><div><a href="http://cname.domain.com/" target="_blank">cname.domain.com</a>        CNAME   <a href="http://test.domain.com/" target="_blank">test.domain.com</a>    (without trailing dot)</div><div><a href="http://test.domain.com/" target="_blank">test.domain.com</a>         A       10.10.10.10</div></div></blockquote><div> </div><div>There is a misunderstanding here.  You would never redirect a domain in RPZ to another domain in RPZ.</div><div>Domains in RPZ must always be redirected to a real domain.  You cannot point it to the wrong place, and then expect it to be redirected again.  It does not work that way.</div><div>Those two RPZ entries are completely separate.</div><div>Do you want <a href="http://cname.domain.com/" target="_blank">cname.domain.com</a> to point to 10.10.10.10?  Then use an A record to 10.10.10.10.</div><div>Do you want <a href="http://cname.domain.com/" target="_blank">cname.domain.com</a> to point to some real domain name (probably a name you control, like a walled garden, or error page)?  Then CNAME to that real name.</div><div> </div><div>-- </div><div>Bob Harold</div><div> </div><div> </div><blockquote style="border-left:1px solid rgb(204,204,204);margin:0px 0px 0px 0.8ex;padding-left:1ex"><div><div> </div><div>In this case I receive</div><div> </div><div># dig <a href="http://cname.domain.com/" target="_blank">cname.domain.com</a> @<a href="http://127.0.0.1/" target="_blank">127.0.0.1</a></div><div>...</div><div><div><a href="http://cname.domain.com/" target="_blank">cname.domain.com</a>.       5       IN      CNAME   test.domain.com.rpz.</div><div>test.domain.com.rpz.    3600    IN      A       10.10.10.10</div><div>...</div><div> </div><div>So, it looks good, but RPZ name is visible, which is unwanted for me.</div><div> </div><div>2.</div><div><div><a href="http://cname.domain.com/" target="_blank">cname.domain.com</a>        CNAME   <a href="http://test.domain.com/" target="_blank">test.domain.com</a>.      (with trailing dot)</div><div><a href="http://test.domain.com/" target="_blank">test.domain.com</a>         A       10.10.10.10</div><div> </div><div>In this case I receive</div><div> </div><div><p># dig <a href="http://cname.domain.com/" target="_blank">cname.domain.com</a> @<a href="http://127.0.0.1/" target="_blank">127.0.0.1</a></p><div><a href="http://cname.domain.com/" target="_blank">cname.domain.com</a>.       5       IN      CNAME   <a href="http://test.domain.com/" target="_blank">test.domain.com</a>.</div><div><a href="http://test.domain.com/" target="_blank">test.domain.com</a>.        531     IN      A       66.96.162.92</div><div> </div><div>(66.98.162.92 is real, «internet» address of <a href="http://test.domain.com/" target="_blank">test.domain.com</a>)</div><div> </div><div> </div><div>Is it possible to make configuration for internal CNAME's in RPZ in which RPZ name will be not visible to user?</div><div> </div><div>Best regards,</div><div>Andrey Geyn</div></div></div></div></div>_______________________________________________<br>Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list<br><br>bind-users mailing list<br><a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a></blockquote></div></div></blockquote></blockquote></div></div>