Tuesday 17 December 2013

How to configure the NTP(network time protocol) server

hello friends I m Deepak Saini again and today I m trying to explain the NTP server.
Lets start 
What is ntp
NTP satnds for network time protocol .NTP server is configure t o synchronize date and time over the network. Mainly configured  to match time for job scheduling ,error -messages , application , loging and so on.
We are set the time of the ntp server with the UTC (universal time clock ) 
Service profile 
1 Package          -             ntp*
2 Daemon          -            ntpd
3 Script              -           /etc/initd/ntpd
4 Port                -               23 
5 Config-File    -           /etc/ntp.conf
6 Log files       -            /var/log/messages

We are not run ip tables before the installation of ntp server

Lets start

1 Check the package of the ntp server
   Synatx :- rpm -qa | grep ntp
  
2 Check the service status of the ntpd on your computer
  Syntax :- #service ntpd status 


3 Open the config file of the ntp server
  syntax :- #  vim .etc.ntp.conf

uncomment tht line no 35 and 36 and save and exit If you want the time from other server then insert here 127.0.0.1 = 192.168.x.x. replace the 127.0.x.x like this with your server ip.

4 Start the service of the ntp server ntpd
  Syntax :- #service ntpd start
  Syntax :-# service ntpd restart 

For start the service on the boot time. 
  Syntax :- chkconfig ntpd  on 

 verify the service start on boot 
  
     syntax :- chkconfig ntpd --list

Flsh  the iptables rules all
   syntax :- iptables -F

7 Use the iptables for create the firewall rules
 syntax :- #iptables -I INPPUT 5 -p udp -m udp --d port 123 -j ACCEPT 

8 Save the firewall rules you just created
 syntax :- #service iptables save

9 Then restart the iptables service
  syntax :- # service iptables restart 

10 Query for the boolran value you need to change
   syntax:-#getsebool -a | grep ntp

11 Disable the SElinux protection
    syntax :- # setsebool -P ntpd_disable_trans=1

12 Verify that the boolean has changed
     syntax :- # getsebool -a | grep ntp

Our server is ready to use 
 i post next post how set up time on client machine with the ntp server 
thanks for reading and sorry for R.I.P english _/\_
  

0 comments:

Post a Comment