# 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 # 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"

Enable NTP server.

# echo 'ntpd_enable="YES"' >> /etc/rc.conf # service ntpd start

Wait 10 minutes after start server.

Check synchronization.

# ntpq -p

Check state NTP server.

# ntpdate -q localhost