1

Hi I've created 3 bind server for public resolution (authoritative).

i got 3 view :

  • World (with an Any acl)
  • East-Asia (with a GeoIP acl)
  • Internal (for internal IP)

i would like to share some common zone for all my views, example i want to resolv domain-a.com and domain-b.com on all my view except for domain-c.

so far i tried theses 2 methods :

First Method

I've tried to do an common-zone conf with an include on all view. but it doesn't seem to be working, i tried this solution : Global zones visible in all views

but got an :

common.zones:3: writeable file 'slave/aaa.example.org': already in use: common.zones:3 

this problem happen on slave only, it seems to be deprecated.

see this com : Global zones visible in all views

Second Method

The other solution i saw is to use the in-view statement. i tried with this :

view "common" {
    match-clients { none; };
    include "/etc/bind/common-view.conf";
};

view "world" {
    match-clients { !key internal-key; !key east-asia-key; world-client; };
    allow-transfer { !key internal-key; !key east-asia-key; srv1; srv2; };

   in-view "common";
   include "/etc/bind/named.conf.default-zones";
   include "/etc/bind/master.conf";
};

unfortunatly it doesn't seems to work either :

Nov 8 17:48:50 bind1 named[19725]: /etc/bind/master.internal.conf:4: unknown option 'in-view' Nov 8 17:48:50 bind1 named[19725]: /etc/bind/master.asia.conf:4: unknown option 'in-view' Nov 8 17:48:50 bind1 named[19725]: /etc/bind/named.conf:16: unknown option 'in-view'.

i know i can do an in-view statement like this on all my zones, but it will be a pain in the ass if i must do 3 modification on each view file if i need to add/delete/update a zone.

view "mordor" {
    ...
    zone example.com {
       ...
    };
};


view "gondor" {
    ...
    zone example.com {
       in-view "mordor";
     };
};

view "khand" {
     ...
     zone example.com {
         in-view "mordor";
     };
};

here is my named -V outpout :

root@bind1:~# named -V

BIND 9.11.4-P2-3~bpo9+1-Debian (Extended Support Version) <id:7107deb>

running on Linux x86_64 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21)

built by make with '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--libexecdir=/usr/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--libdir=/usr/lib/x86_64-linux-gnu' '--sysconfdir=/etc/bind' '--with-python=python3' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-gost=no' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-libidn2' '--with-libjson=/usr' '--with-lmdb=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/softhsm/libsofthsm2.so' '--with-randomdev=/dev/urandom' '--enable-dnstap' '--with-eddsa=no' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/bind9-jvc86P/bind9-9.11.4.P2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE -DDIG_SIGCHASE' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'

Thank you in advance.

  • I suggest writing scripts for adding/deleting zones using the `in-view` statement. I'm sure you can create fairly easy scripts if you use the correct `include` statements to keep the files to be modified to a minimum. – Tommiie Nov 12 '18 at 13:05

1 Answers1

0

i totaly changed my conf structure. with this KB : https://kb.isc.org/docs/aa-00851 Example 4 - Now with shared zones