I am trying to set up a machine to act as an ntp server to which the other local machines will syncronise their times to. This needs to happen regardless of whether the ntp server machine is connected to the internet, i.e: it is not important that the time is correct, just that the machines are synchronised with each other.
My configuration files are as follows:
NTP server /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
NTP client /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server 192.168.1.146 iburst
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
I change the time on the server
I then run the ntp server with sudo /etc/init.d/ntp start
And try test that the client can receive an ntp update with sudo ntpdate 192.168.1.146
This works, but only when connected to the Internet (even though the master has the time set by my command and not from an external ntp server/s).
Anything in my configuration files wrong? Any step I am missing?