macro for query-source option?

Nate Campi nate at wired.com
Wed Dec 5 20:11:20 UTC 2001


On Wed, Dec 05, 2001 at 12:01:35PM -0800, D.M. wrote:
> 
> I have a distributed environment where 1 server distributes a single
> named.conf to several machines.  Now I have the need to add the
> query-source option so queries go out the public admin interface on
> those several machines, however, that interface IP is unique to each
> machine (of course) so I can't put a static value in the master
> named.conf.  Is there a macro or someway of having query-source use
> local info for this option.  Say something like:
> 
> query-source address <local FQDN's IP> port *;

We generate apache config files using m4, since apache itself doesn't
support macro expansion in config file (unless you count full perl code
in startup files with mod_perl). You could do the same thing for 
named.conf. 

Another way to do it is to put a static copy of named.conf and include 
a file into it - which is pushed to the slaves. This is my approach. I use
it to generate a version of named.conf (that I call named.zones) which
contains only the "zone" directives, generated from the zones on my
master server. I sync that file, HUP the server and all the zones from
my master are loaded on the slaves. My options{}, logging{}, etc
statements aren't touched, only the list of zones. Works like a charm.
-- 
Nate Campi | Terra Lycos DNS | SF UNIX Operations | (415) 276-8678

It used to be said [...] that AIX looks like one space alien
discovered Unix, and described it to another different space alien who
then implemented AIX. But their universal translators were broken and
they'd had to gesture a lot. 



More information about the bind-users mailing list