Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Slave zone in BIND (9.17)

    Scheduled Pinned Locked Moved pfSense Packages
    6 Posts 2 Posters 366 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      allxi
      last edited by

      PfSense 2.7.2 & pkg BIND 9.17
      I created a slave zone.
      But i didn't find this zone in my configuration and the /usr/local/etc/namedb/slave folder is empty.

      I checked such paths

      /etc/namedb/named.conf
      /usr/local/etc/namedb/bind.keys
      /usr/local/etc/namedb
      /usr/local/etc/namedb/slave
      /var/etc/named/ 
      
      /etc/namedb/named.conf -u bind -t /var/etc/named/
      
      built with '--disable-linux-caps' '--localstatedir=/var' '--sysconfdir=/usr/local/etc/namedb' '--with-dlopen=yes' '--without-python' '--with-libxml2' '--with-openssl=/usr' '--with-readline=-L/usr/local/lib -ledit' '--with-dlz-filesystem=yes' '--enable-dnstap' '--disable-fixed-rrset' '--disable-geoip' '--without-maxminddb' '--without-gssapi' '--without-libidn2' '--with-json-c' '--disable-largefile' '--without-lmdb' '--disable-native-pkcs11' '--disable-querytrace' '--enable-tcp-fastopen' '--disable-symtable' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ' 'LDFLAGS= -L/usr/local/lib -ljson-c -fstack-protector-strong ' 'LIBS=-L/usr/local/lib' 'CPPFLAGS=-isystem /usr/local/include' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/dns/bind916/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 
      
      

      Where to dig?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        allxi
        last edited by

        ...
        I found problem.
        I need to add a VIEW and select in the zone it

        Thanks
        Manual https://geekistheway.com/2023/03/18/configuring-dns-bind9-on-your-pfsense/

        1 Reply Last reply Reply Quote 0
        • A
          allxi
          last edited by

          How to save the slave zone?

          After reboot my slave zone is empty, if there is no master.

          A LarryFahnoeL 2 Replies Last reply Reply Quote 0
          • A allxi referenced this topic on
          • A
            allxi @allxi
            last edited by

            @allxi

            Add file backup before reboot.
            touch /usr/local/etc/rc.d/shutdown.bindbackupzone.sh
            chmod +x /usr/local/etc/rc.d/shutdown.bindbackupzone.sh

            VIEW - "lan"

            ------shutdown.bindbackupzone.sh---------
            /usr/local/etc/rc.d/named.sh stop
            cp -f /var/etc/named/etc/namedb/slave/lan/domain.com.DB /cf/conf/bind/slave/lan/domain.com.DB
            cp -f /var/etc/named/etc/namedb/slave/lan/1.168.192.DB /cf/conf/bind/slave/lan/1.168.192.DB

            Restore.
            add 2 package Service_Watchdog, Shellcmd

            Shellcmd
            /usr/local/etc/rc.d/named.sh stop & /bin/sleep 1 & cp -f /cf/conf/bind/slave/lan/domain.com.DB /var/etc/named/etc/namedb/slave/lan/domain.com.DB & cp -f /cf/conf/bind/slave/lan/1.168.192.DB /var/etc/named/etc/namedb/slave/lan/1.168.192.DB
            afterfilterchangeshellcmd

            Service_Watchdog
            named

            1 Reply Last reply Reply Quote 0
            • LarryFahnoeL
              LarryFahnoe @allxi
              last edited by LarryFahnoe

              @allxi said in Slave zone in BIND (9.17):

              After reboot my slave zone is empty, if there is no master.

              A slave or secondary zone is intended to work with the contents transferred in from a master or primary zone. You would not normally manually create a slave zone FILE. Here's the typical slave/secondary config:

              // We are the secondary server for example.com
              zone "example.com" {
              // this is a secondary server for the zone
              type secondary;
              // the file statement here allows the secondary to save
              // each zone transfer so that in the event of a program restart 
              // the zone can be loaded immediately and the server can start 
              // to respond to queries without waiting for a zone transfer file "example.com.saved";
              // IP address of example.com primary server
              primaries { 192.168.254.2; };
              };
              

              The bind ARM is the place to read up on the intended use: https://bind9.readthedocs.io/en/latest/

              --Larry

              A 1 Reply Last reply Reply Quote 0
              • A
                allxi @LarryFahnoe
                last edited by

                Hello @LarryFahnoe
                Thank you. I know it. But sometimes I need to use a server without internet. (master is not available)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.