<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt'>
<p>OK, it might be too early and i'm not getting your question, I'm only half way through my first coffee of the day...</p>
<p><br /></p>
<p>But if you have 192.168.0.1 as  lan, and the wan, lets say is 1.1.1.1, and needs to resolve a hostname, it has to go to the big wide world of internets, and it can only do that using 1.1.1.1, therefor thats the only way it will work, your internal LAN IP is not asking the root serves or subsequent in chain, your WAN IP is, because routing, pvt address space etc, you know...</p>
<p><br /></p>
<p><br /></p>
<p>On 18/10/2019 07:16, CpServiceSPb . wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">I have Bind9 on Ubuntu 18.04 x64 LTS working as a cache and forwarding one.<br /> There are some forwarders IPs.<br /><br /> Server has 2 NICs (lan and wan) .<br /><br /> BInd9 binds strictly to localhost and lan NICs, that is to 127.0.0.1 and<br /> 192.168.0.1.<br /> But when Bind9 forwards queries to external servers, it do it via wan<br /> interface but uses at the first onset server external IP as sources, which<br /> is not changed by SNAT or MASQUERADE Iptables.<br /> Unlike other soft, for example Asterisk, what is binded to lan interface<br /> only and uses internal (192.168.0.1) IP as source for outgoing packet and<br /> then iptables changes source address of such outgoing packets from internal<br /> to external using either SNAT or MASQUERADE.<br /><br /> So how is to change Bind9 , what and where is to set up and waht setting<br /> that Bind9 would send forwarding packet via wan interface but would use<br /> address what it is binded to or internal, if it is binded to 127.0.0.1 and<br /> 192.168.0.1 ?</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank" rel="noreferrer">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" rel="noreferrer">bind-users@lists.isc.org</a><br /><a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank" rel="noreferrer">https://lists.isc.org/mailman/listinfo/bind-users</a></div>
</blockquote>
<p><br /></p>
<div>-- <br />
<p>Kind Regards,</p>
<p>Noel Butler</p>
<table border="1" width="748" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td style="text-align: left;"><span style="font-size: 10pt;"><small><small><small><small>This Email, including any attachments, may contain legally privileged information, therefore remains confidential and subject to copyright protected under international law. You may not disseminate, discuss, or reveal, any part, to anyone, without the authors express written authority to do so. If you are not the intended recipient, please notify the sender then delete all copies of this message including attachments, immediately. Confidentiality, copyright, and legal privilege are not waived or lost by reason of the mistaken delivery of this message. Only <a href="http://www.adobe.com/">PDF</a> and <a href="http://en.wikipedia.org/wiki/OpenDocument">ODF</a> documents accepted, please do not send proprietary formatted documents </small></small></small></small></span></td>
</tr>
</tbody>
</table>
</div>
</body></html>