follow the instruction in http://www.gentoo.org/doc/en/home-router-howto.xml
no matter I use Dimension4 or w32time in Windows2000,
Firewall allow any traffic from the server or port 123 as mention in the document.
I still can get the Windows2000 time to sync with the ntp tux box.
The message I get from Dimension4 is
"The NTP message received is invalid! Will try again in a moment..."
The following are the config files of ntp and ntp-client
/etc/ntp.conf
Code: Select all
# Name of the servers ntpd should sync with
# Please respect the access policy as stated by the responsible person.
#server ntp.example.tld iburst
#server pool.ntp.org
server ntp.cuhk.edu.hk
##
# A list of available servers can be found here:
# http://www.pool.ntp.org/
# http://www.pool.ntp.org/#use
# A good way to get servers for your machine is:
# netselect -s 3 pool.ntp.org
##
# you should not need to modify the following paths
driftfile /var/lib/ntp/ntp.drift
#server ntplocal.example.com prefer
#server timeserver.example.org
# Warning: Using default NTP settings will leave your NTP
# server accessible to all hosts on the Internet.
# If you want to deny all machines (including your own)
# from accessing the NTP server, uncomment:
#restrict default ignore
restrict default ignore
# To deny other machines from changing the
# configuration but allow localhost:
restrict default nomodify nopeer
restrict 127.0.0.1
# To allow machines within your network to synchronize
# their clocks with your server, but ensure they are
# not allowed to configure the server or used as peers
# to synchronize against, uncomment this line.
#
#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
Code: Select all
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.15 2004/07/15 00:05:46 agriffis Exp $
# Options to pass to the ntpd process
# Most people should leave this line alone ...
# however, if you know what you're doing, feel free to tweak
NTPD_OPTS="-u ntp:ntp"
Code: Select all
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.confd,v 1.10 2005/01/28 22:37:09 vapier Exp $
# Command to run to set the clock initially
# Most people should just leave this line alone ...
# however, if you know what you're doing, and you
# want to use ntpd to set the clock, change this to 'ntpd'
NTPCLIENT_CMD="ntpdate"
# Options to pass to the above command
# This default setting should work fine but you should
# change the default 'pool.ntp.org' to something closer
# to your machine. See http://www.pool.ntp.org/ or
# try running `netselect -s 3 pool.ntp.org`.
#NTPCLIENT_OPTS="-Q -b -u pool.ntp.org"
NTPCLIENT_OPTS="-Q -b -u ntp.cuhk.edu.hk"
# How long to wait (in seconds) before giving up.
# Useful for when you boot and DNS/internet isn't
# really available but you have your net interface
# come up with say a static IP.
NTPCLIENT_TIMEOUT=30


