Serveur NTPd
Un article de Diablotins.org.
|
Sommaire |
[modifier]
Lancement d'un serveur NTPd
[modifier]
Introduction Ă NTPd
NTP est un protocole de temps/synchronisation temporel, très utilisé sous UNIX. NTPd est installé par défaut dans FreeBSD, mais n'est pas actif après l'installation.
[modifier]
Configuration FreeBSD RC
IL faut ajouter certaine lignes dans le /etc/rc.conf :
# vi /etc/rc.conf -- # le lancement de NTPDATE n'est pas obligatoire # il met a jour l'heure au démarrage ntpdate_enable="YES" ntpdate_program="/usr/sbin/ntpdate" ntpdate_flags="-b canon.inria.fr" # lancement de Xntpd xntpd_enable="YES" xntpd_program="/usr/sbin/ntpd" xntpd_flags="-p /var/run/ntpd.pid"
[modifier]
Configuration Service NTPd
Il faut modifier la configuration de ntpd :
vi /etc/ntp.conf -- # liste des serveurs français les plus fiables server 192.93.2.20 prefer # canon.inria.fr server 195.220.94.163 # chronos.cru.fr server 134.214.100.6 # univ-lyon1.fr driftfile /var/db/ntp.drift # restriction d'accès au Localhost restrict 127.0.0.1 mask 255.255.0.0 nomodify notrap nopeer notrust # restriction d'accès au LAN de reseau IP : 192.168.1.0/24 restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
[modifier]
Utilisation
On peut dès maintenant lancer Xntpd via :
# ntpd -p /var/run/ntpd.pid
