I'm facing an issue with time synchronization between my Windows PC and an Ubuntu NTP server for a month now and I wanted to ask for some help. Here's my setup and what I've tried so far:
Setup: Ubuntu PC:
- IP Address: 1**.***.*.**0
- NTP Server: ntpd running and synchronized with multiple servers.
- Firewall (UFW): Disabled
Windows PC:
- IP Address: 192.***.*.**
- Windows Time service (w32time): Running
- Firewall: Added rule to allow UDP traffic on port 123
Steps Taken: Ubuntu NTP Configuration: Added the following lines to /etc/ntp.conf:
restrict 192.***.*.* mask 255.255.255.0 nomodify notrap
server 0.ubuntu.pool.ntp.org iburst
server 1.ubuntu.pool.ntp.org iburst
server 2.ubuntu.pool.ntp.org iburst
server 3.ubuntu.pool.ntp.org iburst
Restarted NTP service: (sudo systemctl restart ntp). Verified NTP status (ntpq -p) shows synchronization with upstream servers.
Windows Configuration: Added firewall rule to allow NTP traffic:
netsh advfirewall firewall add rule name="Allow NTP" protocol=udp dir=in localport=123
action=allow
Configured NTP server:
w32tm /config /manualpeerlist:1**.***.*.*** /syncfromflags:manual /reliable:YES /update
Restarted Windows Time service:
net stop w32time
net start w32time
Resynchronization:
w32tm /resync
Issue: Despite these configurations, my Windows PC continues to use the local CMOS clock as the time source. The output of w32tm /query /status
shows:
Source: Local CMOS Clock
ReferenceID: 0x4C4F434C (LOCL)
Stratum: 1
Running w32tm /stripchart /computer:1**.***.*.**0 /samples:5 /dataonly
results in timeout errors:
Tracking 1**.***.*.**0 [1**.***.*.**0:123].
Collecting 5 samples.
The current time is 19/08/2024 14:57:27.
14:57:27, +1956.0418399s
14:57:29, +1956.0418009s
14:57:31, +1956.0417711s
14:57:33, +1956.0417003s
14:57:35, +1956.0416871s
PS C:\WINDOWS\system32> w32tm /query /peers
#Peers: 1
Peer: 1**.***.*.**0
State: Pending
Time Remaining: 0.0000000s
Mode: 0 (reserved)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 0 (unspecified)
Additional Information:
- I can ping the Ubuntu PC from the Windows PC without any issues.
- The Ubuntu NTP server is synchronized with its upstream servers.
- On Ubuntu,
sudo iptables -L INPUT -v -n
returns the default policy is ACCEPT.
- Using a second Windows PC on a different network (10.221.xx.xx), I am able to sync successfully, but not using the 192.168.0.x network.
More Details :
- Microsoft Windows 10 Enterprise OS Version: 10.0.18362 N/A Build 18362 System Manufacturer: System Model: System Type: x64-based PC Processor(s): 1 Processor(s) Installed.
- BIOS Version: American Megatrends Inc. 5.12, 05/03/2018
- Time on Windows : 2024-08-19 23:22:13
- Time on Ubuntu : Mon 19 Aug 2024 11:54:59 PM +08 ( I had set the time to be few minutes behind the ubuntu to check if the synchronisation is taking place)
- Microsoft Windows : [Version 10.0.18362.356]
- Enabled Windows Time Service debug logging.(But not sure how to use it)
Any advice on why the Windows PC isn't syncing with the Ubuntu NTP server and continues to use the local CMOS clock? Are there additional configurations or diagnostics I should try on the Windows side? Is there anything specific to the 192.168.0.x network that could be causing this issue? I have been trying to resolve this for 1 month now and would greatly appreciate any help or insights. Thank you.
***Personal information deleted by the moderator. Please see the *Microsoft Community Frequently Asked Questions* for more information on how you can protect your privacy.***
***Moved from Windows / Windows 10 / Settings***