question about include syntax in /etc/named.conf

phn at icke-reklam.ipsec.nu phn at icke-reklam.ipsec.nu
Tue Jul 6 06:56:31 UTC 2004


John Ho <magiciq at noordbrabant.net> wrote:
> Hi all,

> My platform is HP-UX 11i + BIND 9.2.0
> I have two view's (acl) in the /etc/named.conf.
> Every time I have to do twice editing in that file if I have to add a z=
one in=20
> it.
> I heard you can decrease you work by using "include" syntax?
> If I put those two zones in a seperate file, like --> include

> "/etc/forward_zones.conf";

> Where I have the put this syntax in the view??
> --->        include "/etc/forward_zones.conf";    <----

How about reading the documentation ; the ARM book:
6.2.5. include Statement Grammar

include filename;

6.2.6. include Statement Definition and Usage

The include statement inserts the specified file at the point that the in=
clude statement is encountered. The include statement facilitates the adm=
inistration of configuration files by permitting the reading or writing o=
f some things but not others. For example, the statement could include pr=
ivate keys that are readable only by a nameserver.


> and how does it work??

> For example if I have this in the /etc/named.conf
> #-----------------------------------------------

> acl "own" {
> 10.10.10.128/25;
> };
> view "own" {
>         match-clients { "own" ;};


> zone "mnc160.mcc310.gprs" {
>         type forward;
>         forwarders {
>                 216.155.160.105;
>                 216.155.160.106;
>                 216.155.160.11;
>                 216.155.160.12;
>                 };
>         forward only;
> };

> zone "mnc003.mcc268.gprs" {
>         type forward;
>         forwarders {
>              62.169.65.1;
>              62.169.65.2;
>               };
>         forward only;                                                  =
     =20
> };

> };


> acl "foreign" {
> 10.10.10.128/25;
> };
> view "foreign" {
>         match-clients { "foreign" ;};


> zone "mnc160.mcc310.gprs" {
>         type forward;
>         forwarders {
>                 216.155.160.105;
>                 216.155.160.106;
>                 216.155.160.11;
>                 216.155.160.12;
>                 };
>         forward only;
> };

> zone "mnc003.mcc268.gprs" {
>         type forward;
>         forwarders {
>              62.169.65.1;
>              62.169.65.2;
>               };
>         forward only;                                                  =
     =20
> };


> };

> #-----------------------------------------------

> Thanks in advance,

> I am looking forward to hear you soon.
> Regards,


I'm still not convinced that "include" will solve anything for you. If yo=
u have
a domain where you want to express slightly different views, why don't yo=
u=20
install some "tags" in the file and use a pre-processor of your own choos=
ing=20
to generate two distinct zonefiles suitable for bind usage ?=20

> John

> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Deinde bericht=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Dit bericht is verstuurd via http://www.twigger.nl. Overal=20
> ter wereld je bestaande mailadres bereikbaar.

> Stuur goedkoop SMS via http://www.twiggersms.nl



--=20
Peter H=E5kanson        =20
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out=
,
	   remove "icke-reklam" if you feel for mailing me. Thanx.


More information about the bind-users mailing list