Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Linux Service Configuration - NTP

3/16/2015

0 Comments

 
As a network guy, you will work with NTP (Network Time Protocol) lots for your network devices.

From Wikipedia, the explanation regarding NTP is:
"The protocol is usually described in terms of a client-server model, but can as easily be used in peer-to-peer relationships where both peers consider the other to be a potential time source.Implementations send and receive timestamps using the User Datagram Protocol (UDP) on port number 123. They can also use broadcasting or multicasting, where clients passively listen to time updates after an initial round-trip calibrating exchange. NTP supplies a warning of any impending leap second adjustment, but no information about local time zones or daylight saving time is transmitted."
A local linux NTP server on the network can be synchronized with a trusted timing source to keep all of your internal NTP clients in sync with an accurate time. For windows ntp server, please check my previous post: Build NTP Windows Server for Network Devices (not Win32Time)

1. Install NTP Server

a. Check your linux release

[root@syslov1p ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)

b. [root@syslov1p ~]# yum install ntp

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Package ntp-4.2.6p5-2.el6.centos.x86_64 already installed and latest version
Nothing to do

2. Modify /etc/ntp.conf

a. add trusted time server, in my case it is 10.9.1.1. Other configuration could be default. 


b. Restart ntpd service

[root@syslov1p ~]# service ntpd restartShutting down ntpd: [  OK  ]Starting ntpd: [  OK  ][root@syslov1p ~]# service ntpd stopShutting down ntpd: [  OK  ][root@syslov1p ~]# service ntpd startStarting ntpd: [  OK  ]

c. Also you could restrict only specific clients

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

d. add local clock as backup

server 127.127.1.0 # local clockfudge 127.127.1.0 stratum 10

3. Verify NTP Status

a. using command ntpq -p
[root@syslov1p ~]# ntpq -p     remote           refid      st t when poll reach   delay   offset  jitter==============================================================================*10.9.1.1     193.108.184.92   3 u   25   64  377    2.173    4.430   3.906

b. Manually synchronize time

[root@syslov1p ~]# ntpdate -u 10.9.1.116 Mar 20:38:58 ntpdate[2671]: adjust time server 10.9.1.1 offset -0.005387 sec

c. on your linux NTP client, you could start your ntp client Daemon and check the ntp client status

[root@syslov1p ~]# /etc/init.d/ntpd start
Starting ntpd:  
[root@syslov1p ~]# ntpdc -c sysinfo
system peer:          r-1-hsrp.mgmt.intern
system peer mode:     client
leap indicator:       00
stratum:              4
precision:            -19
root distance:        0.18851 s
root dispersion:      1.09599 s
reference ID:         [10.9.1.1]
reference time:       d8b1b105.8e2ff185  Mon, Mar 16 2015 20:44:05.555
system flags:         auth monitor ntp kernel stats
jitter:               0.000000 s
stability:            0.000 ppm
broadcastdelay:       0.000000 s
authdelay:            0.000000 s





0 Comments



Leave a Reply.

    Categories

    All
    Architecture
    Blog
    Checkpoint
    Cisco
    Cloud
    CyberArk
    F5
    Fortigate
    Guardium
    Juniper
    Linux
    Network
    Others
    Palo Alto
    Qualys
    Raspberry Pi
    Security
    SIEM
    Software
    Vmware
    VPN
    Wireless

    Archives

    March 2024
    February 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    October 2019
    September 2019
    June 2019
    July 2018
    May 2018
    December 2017
    August 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015

    Print Page:

    RSS Feed

    Email Subscribe
Powered by Create your own unique website with customizable templates.
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org