I wanted a network time protocol server running on my Ubuntu server – so I could point various other computer-related items to that instead of hitting the internet.
Login as root on your Ubuntu server
apt-get remove ntpdate
apt-get install ntp
nano /etc/ntp.conf
I have the following servers in my list:
server ntp.ubuntu.com
server us.pool.ntp.org
server 10.1.0.14 (a MS domain controller)
Then under the restrict for users (at the bottom of the config file):
restrict 10.4.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.1.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.2.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.3.0.0 mask 255.255.255.0 nomodify notrap
Ctrl + X
Y
/etc/init.d/ntp restart
You can see what servers are giving you data with this:
ntpq -np
You can always run ntpdate ip_of_server to update on the client side:
ntpdate 10.4.0.253