I would like to configure the ntp daemon inside a chroot enviroment. The OS I am suing is Debian 9.1, kernel 3.16.0-4-686-pae
The service run as: /usr/sbin/ntpd -p /var/run/ntpd.pid -i /var/chroot/ntp -u ntp:ntp -l /var/log/ntpd.log
The problems I face are:
1) The ntp daemon can't resolve DNS name, but its working as expected with IP addressed. Am I missing any special files inside the chroot path?
ntpd[2936]: retrying DNS 1.gr.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 1.europe.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 0.europe.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 0.gr.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 0.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 1.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 2.pool.ntp.org: Name or service not known (-2)
ntpd[2936]: retrying DNS 3.pool.ntp.org: Name or service not known (-2)
2) Although the ntp server starts with "-i /var/chroot/ntp" not all paths inside ntpd.conf are relevant to this directory. For example:
ntp.conf:
driftfile var/lib/ntp/ntp.drift
logfile /var/chroot/ntp/var/log/ntpd.log
Log file requires the whole path; should ntpd be able to access files outside the chroot dir?