Results 1 to 8 of 8
hi everbody, i need your help please.
i have a fedora machine and i want to make it as a NTP server.how can i do do that?
i have configured ...
- 08-03-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
Fedora as a NTP server
hi everbody, i need your help please.
i have a fedora machine and i want to make it as a NTP server.how can i do do that?
i have configured aan ntp.conf but still odesnt work???
can anybody help me please?
Thankyou.
- 08-03-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
Hi,
This is for CentOS but should be more or less the same.
1.you should be sure ntp daemon is installed :
# rpm -qa | grep ntp
If not, install it :
# yum install ntp
2.configure it (/etc/ntp.conf)
3.Start the service
# service ntpd start
4.Ensure automatic startup at boot
# chkconfig --level 345 ntpd on
- 08-03-2010 #3Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
thanks for your respond.
but i did all what you told me.what i have is the following:
the machine is sychronasing with a NTP server but other machines (linux and windows) in the network not with this machine.
who can i make the machine a ntp server so all the other servers in the network can sychronaize with it ???
- 08-03-2010 #4Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
You should add some restrict line in your configuration file :
Ex :
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
server ntp.univ-lyon1.fr prefer
# Optional : if you want you ntp server to broadcast on your subnet
broadcast 192.168.1.255
# Allow access to the reference server but no query back
restrict ntp.univ-lyon1.fr mask 255.255.255.255 nomodify notrap noquery
# Allow your subnet
restrict 192.168.1.0 mask 255.255.255.0 nomodify
# This should stay for ntp work ok
restrict 127.0.0.1
After that restart the service AND wait a little bit. It take some time before the server accept query.
Check on the server :
# ntpq -p
(should be '*' at the begining of the line when it's synchronized (and accept queries)
LOCAL(0) .LOCL. 10 l 44 64 377 0.000 0.000 0.001
*dns.univ-lyon1. 195.220.94.163 2 u 42 64 377 19.040 -0.058 0.504
192.168.1.255 .BCST. 16 u - 64 0 0.000 0.000 0.001
- 08-04-2010 #5Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
i did everything what u said above but stil not sychronazation with our network.
any other ideas please?
thanks in advance
- 08-05-2010 #6Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
No sorry, it worked for me.
Did you have the '*' in the ntpq -p output ? If your clock is not correctly synchronised, ntp will not accept request. Please post you ntp.conf and the result of ntpq -p (after a few minutes to let it synchronise)
Here is some link :
NTP - SEIA OpenSource Wiki
Quick HOWTO : Ch24 : The NTP Server - Linux Home Networking
- 08-05-2010 #7Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
i tried two different ways to configure ntp.conf .he synchronaize with extern so the clock of the server is ok but he is not synchronaizing with my intern network(windows and linux machines)
the first configuration
-------------------------
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict 127.0.0.1
server 0.pool.ntp.org
server 1.nl.ntp.org
server 2.europe.ntp.org
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.nl.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.europe.ntp.nl mask 255.255.255.255 nomodify notrap noquery
# put here your local subnet (s)
restrict 172.16.1.0 mask 255.255.255.0 nomodify
# Distro dependant (keep what´s on the default file installed by RPM)
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
the second one
-------------------
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
# -- CLIENT NETWORK -----------
# Permit systems on this network to synchronize with this time service. Do not
# permit those systems to modify the
# configuration of this service. Also, do not use those
# systems as peers for synchronization.
restrict 172.16.1.0 mask 255.255.0.0
restrict 172.17.1.0 mask 255.255.0.0
#--- OUR TIMESERVERS -----
restrict ntp.univ-lyon1.fr mask 255.255.255.255
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.europe.pool.ntp.org
server 4.nl.pool.ntp.org
server 5.be.pool.ntp.org
server 6.de.pool.ntp.org
#--- NTP MULTICASTCLIENT ---
# multicastclient # listen on default 224.0.1.1
#restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
keys /etc/ntp/keys
again i dont have anyproblem with synchronazing with a extern ntp server???
thanks alot for your help
- 08-05-2010 #8Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
In both case, you need to change this line
restrict 172.16.1.0 mask 255.255.0.0
to YOUR subnet (exept if it's the one I gave you ???)
e.g.
restrict 192.168.1.0 mask 255.255.255.0


Reply With Quote