Slave zone in BIND (9.17)
-
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. -
...
I found problem.
I need to add a VIEW and select in the zone itThanks
Manual https://geekistheway.com/2023/03/18/configuring-dns-bind9-on-your-pfsense/ -
How to save the slave zone?
After reboot my slave zone is empty, if there is no master.
-
-
Add file backup before reboot.
touch /usr/local/etc/rc.d/shutdown.bindbackupzone.sh
chmod +x /usr/local/etc/rc.d/shutdown.bindbackupzone.shVIEW - "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.DBRestore.
add 2 package Service_Watchdog, ShellcmdShellcmd
/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
afterfilterchangeshellcmdService_Watchdog
named -
@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
-
Hello @LarryFahnoe
Thank you. I know it. But sometimes I need to use a server without internet. (master is not available)