<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am currently building a Network Access Control system, and in order to keep it “out of band” (via a layer 3 firewall), I would ideally like to use a DNS redirect to send people to the NAC server from a registration VLAN.<o:p></o:p></p>
<p class="MsoNormal">I am having issues with doing a redirect with some exceptions (the registration VLAN needs access to the University Shibboleth servers and the IT registration pages which are outside the College network).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now I realise that I am not the first person to try and do this, so I searched the mailing list for similar discussions.<o:p></o:p></p>
<p class="MsoNormal"><a href="https://www.unbound.net/pipermail/unbound-users/2010-April/001134.html">https://www.unbound.net/pipermail/unbound-users/2010-April/001134.html</a><o:p></o:p></p>
<p class="MsoNormal"><a href="https://www.unbound.net/pipermail/unbound-users/2010-May/001171.html">https://www.unbound.net/pipermail/unbound-users/2010-May/001171.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Based on what I found (and read in the annotated unbound.conf file) I realised that something like this should work:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">local-zone: "." redirect<o:p></o:p></p>
<p class="MsoNormal">local-data: ". A <NAC server ip>"<o:p></o:p></p>
<p class="MsoNormal">local-zone: "google.co.uk" transparent<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This however doesn’t seem to work as I would expect it to, as everything is redirected by the local-data to the NAC server ip.<o:p></o:p></p>
<p class="MsoNormal">(note: changing this to “refuse” rather than “redirect” works as expected, can connect to google.co.uk, get refused for everything else)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I thought this might be a version issue, as CentOS 7 is packaged with an older version (1.4.20??) and I know that in recent versions additional options were added for the zone types.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So I compiled 1.6.0 from source and experienced the same behaviour, even when attempting to use always_transparent , I tried all sorts of other iterations of options and none worked as I had hoped…<o:p></o:p></p>
<p class="MsoNormal">Noticing that I can find multiple references to the above example, has the behaviour of Unbound changed?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If so how do I accomplish the above, I would expect the “always_transparent” would have been the answer if the local-data was the cause of the behaviour:<o:p></o:p></p>
<p class="MsoNormal">“always_transparent      Like  transparent,  but  ignores local data and resolves normally.”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But this still doesn’t work as expected when using a redirect.<o:p></o:p></p>
<p class="MsoNormal">Any help would be greatly appreciated!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Simon Wedge<o:p></o:p></p>
<p class="MsoNormal">St Antony’s College<o:p></o:p></p>
<p class="MsoNormal">University of Oxford<o:p></o:p></p>
<p class="MsoNormal">(apologies if you get two copies of this message)<o:p></o:p></p>
</div>
</body>
</html>