External NTP Server Sync Configuration in Azure Linux VM as CIS Hardening

Gomathi D 20 Reputation points
2024-03-19T08:28:11.7833333+00:00

Hi Azure Team,

We managed to configure the NTP to point to the external servers. However, the Linux server are using PHC0 (Azure Host) for ntp time sync.

 Is it possible to disable the time sync to Azure host and point to external ad server for ntp?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2024-03-19T16:30:39.8333333+00:00

    @Gomathi D

    Yes, this is possible. There is a separate page that covers NTP and time sync for Linux VMs. This is referenced in the Configuration options section:

    "Of course, the default configuration can be changed. An older image that is configured to use ntpd and an external time source can be changed to use chronyd and the /dev/ptp device for Azure host time. Similarly, an image using Azure host time via a /dev/ptp device can be configured to use an external NTP time source if required by your application or workload."

    You will need to update chrony.conf and remove PHC. You can then set it up to utilize your own NTP server. You might find this configuration guide for Ubuntu handy for this.

    Hope this helps! Let me know if you still have questions or need further assistance.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Gomathi D 20 Reputation points
    2024-03-20T06:33:33.87+00:00

    Hi deherman-MSFT,

    Thank you for the clarification . We managed to fix the NTP to point to external server by commenting refclock line in the /etc/chrony.conf

    Enable virtual hardware clock time source

    #refclock PHC /dev/ptp_hyperv poll 3 dpoll -2 offset 0
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.