***Server ip is= 192.168.122.45***
# yum install ntp ntpdate
#vim /etc/ntp.conf
restrict 127.0.0.1
restrict default ignore
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org
restrict 0.rhel.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.rhel.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.rhel.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 192.168.122.0 mask 255.255.254.0 nomodify notrap
ntp server synchronization test
# ntpq –p
Output comes like below working fine!
remote refid st t when poll reach delay offset jitter
===============================================================
+59.90.134.67 116.193.83.174 3 u 17 64 377 73.294 -8.165 24.050
*segment-119-226 193.79.237.14 2 u 15 64 377 23.212 -75.646 28.411
+ns3.net4india.c 199.167.198.163 3 u 6 64 377 38.989 -9.105 15.379
LOCAL(0) .LOCL. 10 l 12 64 377 0.000 0.000 0.001
-----------------------------------------------------------------------------------------------------------
NTP-Client install
# yum install ntp ntpdate
#vim /etc/ntp.conf
restrict default ignore
server 192.168.122.45
restrict 192.168.122.0 mask 255.255.254.0 nomodify notrap
ntp server synchronization test
# ntpq –p
Output comes like below works fine!
remote refid st t when poll reach delay offset jitter
===========================================================
*akt-dbtest-svr. 119.226.101.130 3 u 46 64 377 0.191 -36.591 30.653
To synchronize manually with server
#ntpdate –u ntpserverip
Firewall setup
Update your firewall settings, open /etc/sysconfig/iptables.
vim /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 123 -j ACCEPT
Save and close the file. Finally, start ntpd:
# service ntpd start
# service iptables restart
# netstat -tulpn
# service ntpd start
# service iptables restart
# netstat -tulpn
No comments:
Post a Comment