From owner-freebsd-questions@freebsd.org Fri Sep 28 15:41:34 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C06510B384A for ; Fri, 28 Sep 2018 15:41:34 +0000 (UTC) (envelope-from doug@safeport.com) Received: from cyrus.watson.org (cyrus.watson.org [204.107.128.30]) by mx1.freebsd.org (Postfix) with ESMTP id 03A7F777E6 for ; Fri, 28 Sep 2018 15:41:34 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 108D3B5E4D for ; Fri, 28 Sep 2018 15:41:33 +0000 (UTC) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id w8SFfW27022544 for ; Fri, 28 Sep 2018 11:41:32 -0400 (EDT) (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id w8SFfWq2022540 for ; Fri, 28 Sep 2018 11:41:32 -0400 (EDT) (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Fri, 28 Sep 2018 11:41:32 -0400 (EDT) From: doug@safeport.com X-X-Sender: doug@fledge.watson.org Reply-To: doug@fledge.watson.org To: freebsd-questions@freebsd.org Subject: Re: Starting ntpd in a jail In-Reply-To: Message-ID: References: <8a138f2e-11d4-d890-c28d-72717a9eed3a@netfence.it> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (fledge.watson.org [127.0.0.1]); Fri, 28 Sep 2018 11:41:32 -0400 (EDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Sep 2018 15:41:34 -0000 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.