Use Windows 10 as NTP Server.

Open the command prompt (cmd) as administrator and fire the following commands:

  1. Enable the NTP server service

net stop W32Time
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config” /v LocalClockDispersion /t REG_DWORD /d 0 /f
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters” /v LocalNTP /t REG_DWORD /d 1 /f
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpServer” /v Enabled /t REG_DWORD /d 1 /f
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config” /v AnnounceFlags /t REG_DWORD /d 5 /f
sc config W32Time start=auto
net start W32Time

2. Check if the NTP server is enabled

w32tm /query /configuration

See in the output the 2nd last line, Enabled: 1 (local) is correct.

NtpServer (Local)
DllName: C:\Windows\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)

3. Allow rule in the firewall

netsh advfirewall firewall add rule name=”NTP Server” dir=in protocol=udp localport=123 profile=any enable=yes action=allow

4. Test the service from external system

w32tm /stripchart /computer: /samples:4 /dataonly


Leave a Reply