Configure NTP

Configure NTP on Pritunl servers

Accurate time is needed for multi host configurations with Pritunl. The script below can be used to configure NTP on Debian and CentOS systems.

sudo yum -y install ntp || true
sudo apt-get --assume-yes install ntp || true
sudo sed -i '/^server/d' /etc/ntp.conf
sudo tee -a /etc/ntp.conf << EOF
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst
EOF
sudo systemctl restart ntp &> /dev/null || true
sudo systemctl restart ntpd &> /dev/null || true
sudo service ntp restart &> /dev/null || true
sudo service ntpd restart &> /dev/null || true
sudo restart ntp &> /dev/null || true
sudo restart ntpd &> /dev/null || true
ntpq -p