Re: BIND 9: substantially updated: https://wiki.debian.org/BIND9
On 15/9/25 16:40, Michael Paoli wrote:
There is an alternative location for primary zone files in /var/lib/bind
but it does not seem common either.
Actually, as far as I can tell, that's what's most commonly intended
for primary zones in the case of dynamic (DDNS, etc.) content.
FYI I investigated further on the location of primary files and there is
no real standard but I did see default debian installs create a
directory /var/lib/bind
It seems on first principles that /var/lib/bind is the correct location
for primary DNS files and associated keys in a subdirectory
named.conf.options: directory "/var/lib/bind";
named.conf.options: key-directory "keys";
That is the primary zone directory is /var/lib/bind and "keys" is a
relative path to the primary zone directory so /var/lib/bind/keys
The reasoning is that /var/cache should be only for stuff that can be
deleted and /var/lib should be stuff that is unique to the system but is
maintained by a package
Other directories in /usr/local are from packages that are compiled from
source and need local permanent storage independent anything in the
distro. So distro packages won't use /usr/local
so /usr/local/etc, /usr/local/lib etc.
I have just moved my primary domains and keys to /var/lib/bind and it
all seems to be working correctly given the config file changes.
My other issue, and this may be only Trixie, is the use of extended file
names in /etc/bind. The one I still use are
-rw-r--r--. 1 root bind 2928 Jan 25 2025 bind.keys
-rw-r--r--. 1 root bind 237 Sep 21 2023 db.0
-rw-r--r--. 1 root bind 271 Mar 23 2022 db.127
-rw-r--r--. 1 root bind 237 Mar 23 2022 db.255
-rw-r--r--. 1 root bind 353 Mar 23 2022 db.empty
-rw-r--r--. 1 root bind 270 Mar 23 2022 db.local
drwxr-s---. 2 root bind 4096 Mar 23 2022 master
-rw-r--r--. 1 root bind 938 May 4 2024 named.conf
-rw-r--r--. 1 root bind 498 Sep 22 2023 named.conf.default-zones
-rw-r--r--. 1 root bind 3141 Sep 15 13:13 named.conf.local
-rw-r--r--. 1 root bind 1557 Sep 15 12:50 named.conf.options
-rw-r--r--. 1 root bind 3311 May 2 2024 named.root
-rw-r-----. 1 bind bind 107 Sep 30 2023 rndc.key
-rw-r--r--. 1 root bind 1317 Mar 23 2022 zones.rfc1918
Reply to: