NTP server
Создаем файл для коррекции аппаратных часов и настраиваем NTP сервер.
Create a file to correct the hardware clock and configure the NTP server.
# touch /etc/ntp/drift
# vi /etc/ntp.conf
server 0.freebsd.pool.ntp.org iburst prefer
server 1.freebsd.pool.ntp.org iburst
server 2.freebsd.pool.ntp.org iburst
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
restrict default limited kod nomodify notrap nopeer noquery
restrict -6 default limited kod nomodify notrap nopeer noquery
# Синхронизация с сервером машин из подсети 192.168.1.0
# Synchronization subnet 192.168.1.0 with NTP server
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 127.0.0.1
restrict -6 ::1
restrict 127.127.1.0
leapfile "/var/db/ntpd.leap-seconds.list"
Включаем NTP сервер.\
Enable NTP server.
echo ‘ntpd_enable=“YES”’ » /etc/rc.conf
service ntpd start
Для успешной синхронизации желательно выждать 10 мин после включения.\
Wait 10 minutes after start server.
Проверяем синхронизацию.\
Check synchronization.
ntpq -p
Проверяем работу сервера.\
Check the state of the NTP server.
ntpdate -q localhost