macro for query-source option?

D.M. hmprimerib at hotmail.com
Thu Dec 6 19:55:08 UTC 2001


> > 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 *;
> >
> > hope this makes sense.
> > # D
> 
> No, no such "macro" capability exists, to my knowledge.
> 
> OPTIONS:
> 
> If you're using a remote-execution facility (e.g. ssh, Kerberized rsh or
> whatever) to distribute the conf files, perhaps you could call a wrapper
> script to localize the query-source parameter.
> 
> If your "options" statement never changes, then perhaps you could have
> each machine "include" a file which would contain a localized version of
> the "options" statement (ISTR that later versions of BIND 9 will even
> let you do "include"s *inside* the "option"s statement, so maybe that's
> another possibility).

Ah, thanks for the 'include' pointer.  I've tested a conf file in
which I've inserted the following line in the options block:

        include "/etc/query-source";

and on the remote machines, the file looks like:

query-source address 1.2.3.4;

and it works just dandy.  I hate the thought of a static file on each
server but it sure beats munging the conf file with m4.

Thanks,
# D


More information about the bind-users mailing list