intelligent NAMED

Kal Feher kal.feher at melbourneit.com.au
Wed May 16 02:34:21 UTC 2007


I've replied to the bind-users list since this conversation started there...

Generate an acl file from your database for each view.

For example:

File newyork.acl contents----

acl "ny-acl" { <ip addresses go here, use ";" to separate> };

--------end newyork.acl contents

Top of named.conf put the line:
include newyork.acl;


In the view statement use the acl like this:

view "newyork_pool_view" {
        match-clients { ny-acl; }
... <rest of view statement goes here>


Therefore, as long as you can generate a flat file with the semi colon to
separate ip addresses (and subnets if possible), you can automatically
refresh this file. Use "rndc reconfig" to apply the new acl each time it
changes.

On 15/5/07 5:47 PM, "storejon001 at gmail.com" <storejon001 at gmail.com> wrote:

> Hi Kal,
> 
> I am looking at trying to implement something like this, but with a
> database back end.  Is it possible to have the match-clients read from
> a mysql database?
> 
> I mean what I want to do is, suppose I have www.domain.com, and when
> someone from New York looks up www.domain.com they will go to
> 1.1.1.1.  I want the rest of the world other than New York browsers to
> go to 2.2.2.2 when looking up for www.domain.com.
> 
> Now, I do have a list of all the New York IPs stored in a MySQL, and
> it changes daily.  My question is how do I get BIND to query MySQL and
> have it generate the match-clients on the fly?
> 
> Or, I can generate a flat file of all new york IPs, but how do I get
> get a match-clients to read a flat file?
> 
> Thanks,
> 
> -Jon
> 
> On May 5, 12:17 am, Kal Feher <kal.fe... at melbourneit.com.au> wrote:
>> Views:
>> Eg
>> view "IP_POOL_1_VIEW" {
>>       match-clients { IP_source_goes_here; };
>>       zone "example.com" {
>>             type master;
>>             file "example-pool_1.db";
>>       };};
>> 
>> view "IP_POOL_2_VIEW" {
>>       match-clients { IP_source_goes_here; };
>>       zone "example.com" {
>>             type master;
>>             file "example-pool_2.db";
>>       };};
>> 
>> view "default" {
>>       // your catch all or default view. Should be the last listed view
>>       match-clients { any; };
>>       zone "example.com" {
>>             type master;
>>             file "example-default.db";
>>       };
>> 
>> };
>> 
>> However there are more reliable and better performing geographic traffic
>> distribution techniques. Using a static list of Ips to determine geographic
>> location is not ideal.
>> 
>> On 5/5/07 1:19 AM, "besnard michel" <mbesn... at gmail.com> wrote:
>> 
>> 
>> 
>>> hi,
>>> i'm looking for special features aka intelligent DNS servers ... may be not
>>> included in BIND
>> 
>>> i need different DNS responses when différents DNS clients ask the same
>>> request
>> 
>>> example :
>> 
>>> some DNS clients request forwww.test.com
>>> if the source IP of the DNS client is in the
>>> - IP_POOL_1 then my DNS server will response IP_ADDRESS_1
>>> - IP_POOL_2 then my DNS server will response IP_ADDRESS_2
>>> - or by default my DNS server will response IP_ADDRESS_3
>> 
>>> i don't want to do load balancing but "geographical" or "zone" load
>>> balancing
>> 
>>> regards,
>>> Michel
>> 
>> --
>> Kal Feher
> 
> 

-- 
Kal Feher




More information about the bind-users mailing list