On Sun, Apr 08, 2007 at 09:14:04PM +0700, Reza Muhammad wrote: > Hi all, > > I was just trying to setup an ntpd server for my home network so it > could sync with each other. So here's what I have in my > /etc/ntpd.conf: > > # $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $ > # sample ntpd configuration file, see ntpd.conf(5) > > # Addresses to listen on (ntpd does not listen by default) > listen on 192.168.1.1 > > # sync to a single server > #server ntp.example.org > > # use a random selection of 8 public stratum 2 servers > # see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers > servers asia.pool.ntp.org > > and here's the log from /var/log/daemon after I run the service: > Apr 8 21:09:32 blowfish ntpd[14921]: listening on 192.168.1.1 > Apr 8 21:09:32 blowfish ntpd[14921]: ntp engine ready > Apr 8 21:09:51 blowfish ntpd[14921]: peer 203.123.49.3 now valid > Apr 8 21:09:51 blowfish ntpd[14921]: peer 202.155.248.218 now valid > Apr 8 21:09:51 blowfish ntpd[14921]: peer 61.129.66.79 now valid > Apr 8 21:09:53 blowfish ntpd[14921]: peer 202.71.97.92 now valid > Apr 8 21:09:53 blowfish ntpd[14921]: peer 60.56.119.79 now valid > Apr 8 21:09:55 blowfish ntpd[14921]: peer 218.75.4.130 now valid > Apr 8 21:09:56 blowfish ntpd[14921]: peer 61.129.90.164 now valid > > Even though it seems to be working, I still can't get the date to sync > from clients. When I try to telnet to 192.168.1.1 on port 123, it > says "Connection Refused". But the daemon is running on the server: > % ps auxw | grep ntpd > root 24933 0.0 0.2 428 600 ?? Is 9:09PM 0:00.00 ntpd: > [priv] (ntpd) > _ntp 14921 0.0 0.2 388 648 ?? S 9:09PM 0:00.02 ntpd: ntp > engine (ntpd) > > Can anyone pleae help me out? > Thanks in advance.
[Fix your mail client, please: 72 columns or less, at least on normal text.] ntpd uses UDP, telnet uses TCP, so telnet isn't the proper tool for testing if the server actually receives packets. In addition, ntpd will only sync to a server that is itself synchronized; this would be the delay Mispunt mentioned. If this is the case, you should see something to that effect in the clients' logs. You might want to investigate -s and/or one of the external timesensors (nmea(4) and co). Joachim -- PotD: x11/xmbdfed - Motif tool for editing X11 bitmap fonts