<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
W.C.A. Wijngaards wrote:<br>
<blockquote id="mid_4A8157C5_6010209_nlnetlabs_nl"
 cite="mid:4A8157C5.6010209@nlnetlabs.nl" type="cite">
  <pre wrap="">On 08/11/2009 11:17 AM, Attila Nagy wrote:
  </pre>
  <blockquote id="StationeryCiteGenerated_1" type="cite">
    <pre wrap="">Zdenek Vasicek (author of the python module) was very kind and helped to
make the query's source IP (and port and transport) accessible from the
python module. This made answering queries based on the source IP
possible with unbound.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
An idea, but because the cache does not know about that
source IP it does not work.  The cache stores the result
from the python module and will then return it to everyone.
  </pre>
</blockquote>
Hmm, yes, that's what I first thought of, but running Zdenek's sample
python program (and the modified pythonmod, which makes the source IP
accessible) it doesn't seem to be the case.<br>
At least, when I issue two queries from two, different machines I get
different answers, as it should be.<br>
<br>
<blockquote id="mid_4A8157C5_6010209_nlnetlabs_nl"
 cite="mid:4A8157C5.6010209@nlnetlabs.nl" type="cite">
  <blockquote id="StationeryCiteGenerated_2" type="cite">
    <pre wrap="">This is pretty much fine if you want to respond according to complex
rules (which involves source IP), but sometimes a simple "views" (like
in bind) solution would be perfectly enough.

This, with the flexible local and stub zones configuration would satisfy
a lot use cases.

So the question is: how hard would it be to make unbound's configuration
source-IP aware? I mean, putting arbitrary configuration into
netblock-indexed configuration blocks.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Easier to deploy two servers, one for internal, one external.
Changing the code to have two unbounds internally that it chooses
from based on source IP would be bloat I think.

Who needs different resolving for internal and external?
Names on the internet are names on the internet, right?
  </pre>
</blockquote>
Not always. :)<br>
Think of a DNS load balancer, which actively monitors servers and give
back only those, which work. And because this doesn't (usually, but
can, for example source sticky load balancing) involve the client's IP,
take for example a location based redirector.<br>
<br>
BTW, what I need this for is the following:<br>
I have a service name, which must be the same for all clients (it is
hardwired in the device). The clients are spread out in the country and
use a normal internet connection and the normal caching nameservers (in
this case: unbound).<br>
The problem is that that hardwired name must resolve to an IP, which is
close to the client. This is determined by the routers' assigned pools,
so everything is simple in theory:<br>
1.1.1.0/24 should resolve abcd.name to 192.168.0.1<br>
1.1.2.0/24 should resolve abcd.name to 192.168.1.1<br>
... and so on.<br>
There is no given pattern, everything can be on each sides. The
networks are aggregated (and does not change often), so it's not a
great hassle to list them in a static config file, that's what bind's
views are good for. But we use unbound. :)<br>
<br>
So this is not quite internal/external (and not just two of them).<br>
<br>
Oh, and please, don't come with anycast routing, that's what I said to
the group, which invented this, but there are other reasons, which
makes that unsuitable for this purpose. :)<br>
<br>
<blockquote id="mid_4A8157C5_6010209_nlnetlabs_nl"
 cite="mid:4A8157C5.6010209@nlnetlabs.nl" type="cite">
  <pre wrap="">
I would guess this is about authority information?
Maybe, simply block access to the local-data elements for some IPs
is do-able.  But the question, for me, is more about what is
really needed here.  If you want infinite customizability then
deploy two servers.
  </pre>
</blockquote>
I hope I described it above to a level, which makes it clear.<br>
<br>
Thanks,
</body>
</html>