How to configure DNS on chroot environment.

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello,

I want to run DNS from the chroot on new server. In my old server it is working from the chroot and I am handing zones manually.
Means change any records from the SSH only not from the cpanel and it is working fine.
In new server, I have not installed bind-chroot rpm on it. Also bind-chroot rpm is not installed on old server as well.

On new server:- (CentOS 6.4)
binutils-2.20.51.0.2-5.36.el6.x86_64
bind-utils-9.8.2-0.17.rc1.el6_4.5.x86_64
bind-libs-9.8.2-0.17.rc1.el6_4.5.x86_64
bind-9.8.2-0.17.rc1.el6_4.5.x86_64
bind-devel-9.8.2-0.17.rc1.el6_4.5.x86_64

On old server:- (CentOS 5.8)
bind-9.3.6-20.P1.el5_8.6
bind-devel-9.3.6-20.P1.el5_8.6
bind-libs-9.3.6-20.P1.el5_8.6
bind-devel-9.3.6-20.P1.el5_8.6
bind-libs-9.3.6-20.P1.el5_8.6
bind-utils-9.3.6-20.P1.el5_8.6

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Could you elaborate on why you prefer to use Bind in a chroot configuration? For instance, is standard environment limiting you from completing certain actions?

Thank you.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Michael,

I am preferring bind in chroot configuration because my old Cpanel DNS server is configured in chroot.
So I am preparing the same DR system, if my old system is totally crashed.

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
It's likely the previous server used it by default. You may actually encounter issues when using bind-chroot because it's not supported. The zones will restore normally on a normal installation of Bind.

Thank you.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Michael,

Yes you are correct. We will manage zone files manually from the SSH.
Just let me know, in my old server DNS is configured in chroot environment but there is no bind-chroot RPM installed.

Thanks,
Imran Khan.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Just let me know, in my old server DNS is configured in chroot environment but there is no bind-chroot RPM installed.
It's possible the RPM was previously installed, and then removed. It's added to the "exclude=" line in the /etc/yum.conf file by default on cPanel servers.

Thank you.
 

imran_khan

Well-Known Member
Jun 10, 2013
154
1
16
cPanel Access Level
Root Administrator
Hello Michael,

I have followed the below procedure on new server.

1). Install bind-chroot rpm.
2). Put the ROOTDIR=/var/named/chroot in /etc/sysconfig/named file.
3). Copy zones files from backup path /example.com/cpbackup/daily/dirs/_var_named/chroot/var/named (DNS is configured in chroot environment on old server) to /var/named.
4). Copy named.conf file from backup path /example.com/cpbackup/daily/dirs/_var_named/chroot/etc/ to /etc/.
5). And restart the named service.

Thanks,
Imran Khan.