Fedora 38
Sponsored Link

BIND : Configure Chroot Environment2023/04/24

 
If you'd like to configure Chroot Environment for named, Set like follows.
[1] After setting Chroot environment, configuration files are placed under [/var/named/chroot].
[named.conf] is placed under [/var/named/chroot/etc/named.conf],
zone files are placed [/var/named/chroot/var/named/***].
When modify settings, Change them under [/var/named/chroot] files.
[root@dlp ~]#
dnf -y install bind-chroot
[root@dlp ~]#
mkdir /var/named/chroot/usr/lib64/named

[root@dlp ~]#
/usr/libexec/setup-named-chroot.sh /var/named/chroot on
[root@dlp ~]#
systemctl disable --now named

[root@dlp ~]#
systemctl enable --now named-chroot

Created symlink /etc/systemd/system/multi-user.target.wants/named-chroot.service → /usr/lib/systemd/system/named-chroot.service.
[root@dlp ~]#
ll /var/named/chroot/etc

total 716
drwxr-x---. 3 root named     23 Apr 24 10:33 crypto-policies
-rw-r--r--. 2 root root     309 Mar 29 09:00 localtime
drwxr-x---. 2 root named      6 Mar 18 09:00 named
-rw-r-----. 1 root named   2389 Apr 24 10:29 named.conf
-rw-r-----. 1 root named   1034 Mar 18 09:00 named.rfc1912.zones
-rw-r--r--. 1 root named    686 Mar 18 09:00 named.root.key
drwxr-x---. 3 root named     25 Apr 24 10:33 pki
-rw-r--r--. 1 root root    6568 Nov 28 00:26 protocols
-rw-r-----. 1 root named    100 Apr 24 10:25 rndc.key
-rw-r--r--. 1 root root  701745 Nov 28 00:26 services

[root@dlp ~]#
ll /var/named/chroot/var/named

total 24
-rw-r--r--. 1 root  root   313 Apr 24 10:24 0.0.10.db
drwxr-x---. 8 root  named   73 Apr 24 10:33 chroot
drwxrwx---. 2 named named   23 Apr 24 10:25 data
drwxrwx---. 2 named named  108 Apr 24 10:31 dynamic
-rw-r-----. 1 root  named 3312 Mar 18 09:00 named.ca
-rw-r-----. 1 root  named  152 Mar 18 09:00 named.empty
-rw-r-----. 1 root  named  152 Mar 18 09:00 named.localhost
-rw-r-----. 1 root  named  168 Mar 18 09:00 named.loopback
drwxrwx---. 2 named named    6 Mar 18 09:00 slaves
-rw-r--r--. 1 root  root   404 Apr 24 10:31 srv.world.lan
Matched Content