Configure NTP Server
====================================================================
Note: NTP server IP:192.168.2.40
NTP client2 IP: 192.168.2.2
NTP client2 IP: 192.168.2.2
# Make sure to install ntp
** Step To create NTP server
# chkconfig ntpd on
# edit /etc/ntp.conf
--> add this line :
peer 192.168.2.2
peer 192.168.2.3
# edit /etc/sysconfig/iptables
--> please enable port 123
# restart ntpd
--> /etc/init.d/ntpd restart
# restart firewall
--> /etc/init.d/iptables restart
=======================================================================
** To configure NTP client to syn with NTP server
=======================================================================
# edit /etc/ntp.conf
--> add this line :
restrict 192.168.2.40 mask 255.255.255.0 nomodify notrap noquery
server 192.168.2.40
** comment out others restrict ..... mask 255.255.255.0 nomodify notrap noquery
# edit /etc/ntp/ntpservers
--> add this line :
192.168.2.40
** comment out others server IP/url
# edit /etc/ntp/step-tickers
--> add this line :
192.168.2.40
# edit /etc/sysconfig/iptables
--> please enable port 123
# restart ntpd
--> /etc/init.d/ntpd restart
# restart firewall
--> /etc/init.d/iptables restart
# fire this command to set the local date and time:
ntpdate -u server_IP
# fire this command to query the NTP server-client synchronisation:
ntpq -pn
****************************************************************************
****************************************************************************
TESTING
SERVER
# update the time and date
CLIENT
# fire command : ntpdate -u 192.168.2.40
# fire comamnd : ntpq -pn
Creadit to
No comments:
Post a Comment