Sidetracked again.
Was helping getting some NTP stuff going at my real job today, when I thought maybe I should get my own home servers setup for ntp as well.
So I did.
The Linux side was easy
A quick search on the web to find the ntp servers nearest NZ (this is where you can find public ntp servers, and chose the ociania pool for one isoltated server to get the internet updates from.
Configured that to serve as well (broadcast wasn’t an obvious entry to change, but that thanks to google yet again is what was needed).
And setup all the other servers on my home network to timesync from that one internet polling server.
It was simple enough, a few changes in /etc/ntp.conf
- On my web server (running Fedora)
- lots of firewall config changes to allow ntp to be requested from the internet and served to my internal network
- change server entries in /etc/ntp.conf to use ociania time sources
- add a restrich entry in /etc/ntpd.conf for my internal network (to un-restrict it no less)
- and update /etc/ntp.conf to broadcast on my internal network (or the other cannot find it)
- chkconfig ntpd on
- service ntpd start
- On my other Linux (all Fedora) servers
- change server entries in /etc/ntp.conf, only one server entry now, the internal address of my web server
- chkconfig ntpd on
- service ntpd start
And just like that it all works. The command ‘ntpq -p’ on the internal servers shows they are getting the time from the web server, and the same command on the web server shows all the internet ntp servers are available, and the time on all my servers is now correct.
The only issue I have is I might have opened up a little more in the firewall than I wanted. OpenNTP allows you to use ‘listen on xxx’ to lock down ntp to one address, the version of ntp shipped with Fedora 10 (and FC8) throws listen statements away, so I have been forced to let ntp listen on all ports and rely on my firewall rules to lock down access.
I think I’ve got it right, none of my servers except the web server accept any traffic origionating on the routers 192… network, but as they all have 192… interfaces it would be nice if the version of ntp with Fedora could be setup to listen only on the internal interfaces.
Anyway, that was the easy bit done.
Windows-XP !!!
Then onto Windows-XP, the painfull bit; yes I still have a desktop with XP, while my favourite games run in Wine they are a bit slow there so I still use XP (it’s a dual boot PC, most of the time my desktop is running Linux OK).
I didn’t know my Windows-XP config had been pinging time.microsoft.com once a week to keep it’s time in sync. Must be an install default, they’ve found another way to track who’s using XP ?.
Anyway, right click on the clock in the taskbar, select adjust date and time, select the internet tab, and you can replace the microsoft time server entry with your own one. However you will notice that this will set your time once a week, thats hardly using ntp for a slow ‘keep in step’ syncronisation, I assume Windows-XP just sets the time weekly instead of keeping it adjusted.
However I persevered, and found out how to do it in a microsoft knowledge base article, you’ll notice from the article the only way to set Windows-XP up to use ntp properly is using regedit, and you want to skip the steps that set it up as an authoritive time server as well, you want to get the time not use your Windows-XP box as the time server.
Guess what. I gave the regedit stuff a miss.
I set the weekly time settings to use my web server as the source instead of the microsoft time source, and left it at that. And no I’m not being lazy, when I use the Linux OS on this dual boot desktop it will set the time correctly and keep it correct, the few hours a week I actually use XP now are not going to make enough difference in time drift to make me want to go anywhere regedit.
Linux is easier
Lets see, on Linux you edit a few lines in a text file to have your clock creep adjusted minutely in an ongoing fashion, on Windows-XP you either manually change registry entries with regedit or accept a once a week time set (on systems with a flakey hardware clock that could be a large adjustment), is it any wonder people are moving to Linux.