Skip to main content

Configure Local NTP Server

· One min read
  1. install NTP package
# CentOS
$ sudo yum install -y ntp

# Ubuntu
$ sudo apt install -y ntp
  1. Edit ntp.conf
$ vim /etc/ntp.conf
# Add local server
server 192.168.5.104

# Set access restrict
restrict 192.168.5.0 mask 255.255.254.0 notrap

# Set logfile
logfile /var/log/ntpservice.log
  1. Start NTP server
$ ntpd
  1. Verify NTP Server
$ ntpq -p