Editare il file /etc/ntp.conf
# cp /etc/ntp.conf /etc/ntp.conf.yum
# vi /etc/ntp.conf
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
restrict default kod nomodify notrap noquery nopeer
restrict 127.0.0.1
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
keys /etc/ntp/keys
# /etc/init.d/ntpd start
# netstat -tulpn |grep ntpd
udp 0 0 192.168.1.1:123 0.0.0.0:* 16083/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 16083/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 16083/ntpd
udp 0 0 fe80::d6ae:52ff:feca:1c7:123 :::* 16083/ntpd
udp 0 0 ::1:123 :::* 16083/ntpd
udp 0 0 :::123 :::* 16083/ntpd
# chkconfig ntpd on
Non dimenticare di aprire la porta 123 UDP sul firewall del server.
iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
iptables -A INPUT -p udp --sport 123 -j ACCEPT
Eseguire i seguenti commandi da un PC cliente (in questo caso un OpenSUSE)
# /etc/init.d/ntp stop
redirecting to systemctl stop ntp.service
# ntpdate 192.168.1.1
10 Oct 13:23:53 ntpdate[7562]: adjust time server 192.168.1.1 offset -0.010755 sec