The QCOW2 image for OpenStack was downloaded from the official Debian website:
The procedure described in the SysAdmin Notes was used.
apt-get update && apt-upgrade
apt-get install bind9 bind9-doc bind9utils chrony dnsutils
systemctl enable chronyd
timedatectl set-timezone America/Mexico_City
- Backing up the default configuration
tar czvf etc.bind.bkp.tar.gz /etc/bind/
- Creating the master zone working directory
mkdir -p /var/named/zones
- Configuring apparmor to allow use of the master zone directory, adding the following 3 lines to /etc/apparmor.d/local/usr.sbin.named:
/etc/bind/** rw,
/var/named/** rw,
/var/named/zones/** rw,
- Reload apparmor
systemctl reload apparmor
Note: If you do not plan to use ipv6 in the DNS, it is a good idea to initialize the named daemon with ipv4 (-4) support only:
/etc/default/bind9
OPTIONS="-4 -u bind"
- The different example files of the DNS Master directory are used.
rndc-confgen -a -b 512 -c /etc/bind/rndc.key
cat /etc/bind/rndc.key > /etc/bind/rndc.conf
rm -rf /etc/bind/rndc.key
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST dns1-dns2.ejemplo.lab.