Thursday, November 20, 2014

Stand-alone NTP Server without Internet access

If you ever want to have an NTP server in environment where there is no internet access,  you can run ntp server on Linux with the following configuration.

# sudo vi /etc/ntp.conf
server 127.127.1.1fudge 127.127.1.1 stratum 12

# sudo /etc/init.d/ntp restart

Run ntpq to check the local stratum level.  (You can change it to any other level, it doesn’t have to be 12 as shown above)

# sudo ntpd –q

You will also have to adjust the ACL using “restrict” configuration.  (In this case, allow NTP server to be accessible from 192.168.1.0/24)

# sudo vi /etc/ntp.conf
restrict 192.168.1.0/24