KEMBAR78
NTP Client Server On CentOS 6 | PDF | Internet Standards | Computer Network
0% found this document useful (0 votes)
4 views4 pages

NTP Client Server On CentOS 6

This document describes how to set up an NTP server and client on CentOS operating systems. It explains the steps to install and configure the ntpdate package on the client to periodically synchronize the time with an NTP server. It then details how to configure the NTP server to accept time requests from clients on the local network and how to verify that the time is correctly updated on the client.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

NTP Client Server On CentOS 6

This document describes how to set up an NTP server and client on CentOS operating systems. It explains the steps to install and configure the ntpdate package on the client to periodically synchronize the time with an NTP server. It then details how to configure the NTP server to accept time requests from clients on the local network and how to verify that the time is correctly updated on the client.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Client - Server NTP

Customer

To change the time zone in Centos-based operating systems, it is necessary to validate that it is located
installed the package that will allow us to set the time zone we are in, with the command:

yum list tzadata.noarch

And then proceed to set the time zone with the command:

tzselect

Respond to the assistant by choosing your time zone, for example: America (2), then Ecuador (20), Mainland (1) and
Yes(1) We confirm the data.

Therefore TZ='America/Guayaquil' will be used.

Local time is now: Wed Jul 3 21:10:19 ECT 2013.

Universal Time is now: Thu Jul 4 02:10:19 UTC 2013.

Now then, to create an NTP server as a client of another NTP server so that the time is updated.
automatically periodically the procedure is as follows:

Install the ntpdate program

yum install ntp*

You add a scheduled task to update the time every 4 hours.

crontab -e

Within the crontab editing you add the following line:

0 */4 * * * /usr/sbin/ntpdate -u 2.pool.ntp.org

We will test that it is recorded correctly.

crontab -l

We start the serviceI

Enable the ntpd service to start at boot


write the sync time to CMOS

edit /etc/sysconfig/ntpd

yes

Now we edit and configure the file.

vi /etc/ntp.conf

# 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).

/var/lib/ntp/drift

Permit time synchronization with our time source, but do not permit the source to query or modify the service on this
system.

restrict default kod nomodify notrap nopeer noquery

Permit all access over the loopback interface. This could be tightened as well, but to do so would affect some of the
administrative functions.

restrict 127.0.0.1

Hosts on local network are less restricted.

restrict 192.168.1.0 mask 255.255.255.0 nomodify no trap


Use public servers from the pool.ntp.org project. We enter the DNS server that we created.

server www.srvuceuio.com

Undisciplined Local Clock. This is a fake driver intended for backup and when no outside source of synchronized.
time is available.

server 127.127.1.0 local clock

fudge 127.127.1.0 stratum 10

Enable public key cryptography.

includefile /etc/ntp/crypto/pw

Key file containing the keys and key identifiers used when operating with symmetric key cryptography.

keys /etc/ntp/keys
I assign the IP of my host as the server.

server 192.168.1.3 iburst

Start the service with:

start ntpd service

Add the service to start automatically with the system:

enable ntpd

We activated port 123 on TCP from the firewall.


Server
We perform the same steps as in the client until we reach modifying the configuration file.

vi/etc/ntp.conf

And we entered the following lines.

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).

/var/lib/ntp/drift

Permit time synchronization with our time source, but do not permit the source to query or modify the service on this.
system.

restrict default kod nomodify notrap nopeer noquery

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

Hosts on local network are less restricted.

restrict 192.168.1.0 mask 255.255.255.0 nomodify no trap

Use public servers from the pool.ntp.org project. We entered the DNS server we created.

server 0.centos.pool.ntp.org

server 1.centos.pool.ntp.org

server 2.centos.pool.ntp.org

server inocar.ntp.ec server ntp.ec

Undisciplined Local Clock. This is a fake driver intended for backup and when no outside source of synchronized
time is available.

server 127.127.1.0 local clock

fudge 127.127.1.0 stratum 10

Enable public key cryptography.

includefile /etc/ntp/crypto/pw

Key file containing the keys and key identifiers used when operating with symmetric key cryptography.

keys /etc/ntp/keys

I assign the IP of my host as the server

server 192.168.1.13 iburst

Now we are going to carry out functionality tests.

date
Thu Jul 4 14:45:23 ECT 2013
and we updated our host, we look for our server
ntpdate -u www.srvuceuio.com
4 Jul 11:46:22 ntpdate[3703]: step time server 192.168.1.13 offset -10793.343840 sec
We verify the update
date
Thu Jul 4 11:47:03 ECT 2013
We are observing our time server table.

watch ntpq -p -n

Biography:
http://www.cyberciti.biz/faq/rhel-fedora-centos-configure-ntp-client-server/
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server
translatedText

http://199.34.120.32:8090/display/DOC/Setup+NTP+Server+on+CentOS

Unable to access the content of the URL provided.

The provided text is a URL and does not contain translatable content.

The provided text is a URL and does not contain translatable content.

Unable to access external URLs or translate their content.

Unable to translate the content from the provided URL.

You might also like