Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2018 11:41:32 -0400 (EDT)
From:      doug@safeport.com
To:        freebsd-questions@freebsd.org
Subject:   Re: Starting ntpd in a jail
Message-ID:  <alpine.BSF.2.20.1809281125360.39669@fledge.watson.org>
In-Reply-To: <dc35e5fe09ae5358576089b49954bd69@dweimer.net>
References:  <8a138f2e-11d4-d890-c28d-72717a9eed3a@netfence.it> <dc35e5fe09ae5358576089b49954bd69@dweimer.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 28 Sep 2018, Dean E. Weimer via freebsd-questions wrote:

> On 2018-09-28 8:50 am, Andrea Venturoli wrote:
>> Hello.
>> 
>> I'm trying to run ntpd in a jail.
>> Before someone points out it won't be able to set time, that's ok :) I
>> just want other clients to be able to synchronize with it.
>> 
>> I can manually "service ntpd start" and it will happily work, but it
>> won't start at boot (or if I restart the jail).
>> 
>> Running "rcorder /etc/rc.d/ntpd" gives the same result in the jail as
>> in base (where ntpd starts correctly):
>>> rcorder: file `/etc/rc.d/ntpd' is before unknown provision `LOGIN'
>>> rcorder: requirement `devfs' in file `/etc/rc.d/ntpd' has no providers.
>>> rcorder: requirement `FILESYSTEMS' in file `/etc/rc.d/ntpd' has no 
>>> providers.
>>> rcorder: requirement `ntpdate' in file `/etc/rc.d/ntpd' has no providers.
>>> rcorder: requirement `DAEMON' in file `/etc/rc.d/ntpd' has no providers.
>> 
>> Any hint?
>
> I tried to do this a while back, everyone told me it wasn't possible. The 
> solution ended up being that you don't restrict the answering IP address on 
> ntpd running on the host. That way the clients receive the answer from the 
> host on the jails IP address, instead of the jail.

I am missing something here. The jail share the kernel. Unless you want the jail 
to be in a different time zone than the kernel, why run ntp in a jail. It is 
interesting that even works.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1809281125360.39669>