LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2015, 02:28 PM   #1
ardabro
Member
 
Registered: May 2015
Location: Katowice, Poland
Distribution: Debian, Ubuntu
Posts: 37

Rep: Reputation: Disabled
Question Is there any way to sync time better if my provider's NTP server sucks?


Hi all
Some time ago my internet provider blocked external ntp requests. The problem is that their ntp server sucks. A couple of days ago I observed 15s drift, today about 7s. For some reason I'd like to have more reliable time.
Is there any way to achieve is? Any there any alternative solutions? Maybe something with tunelling? It doesn't need to be constant synchronisation. A sync script started 2-3 times a day would be probably enough. I'm developer so I'm able to write some helper program if it is necessary but I don't know how to obtain reliable time data.

Can You advise something?
 
Old 09-03-2015, 02:49 PM   #2
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
Add an entry to crontab that runs ntpdate once an hour.
 
Old 09-04-2015, 12:38 PM   #3
ardabro
Member
 
Registered: May 2015
Location: Katowice, Poland
Distribution: Debian, Ubuntu
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by whizje View Post
Add an entry to crontab that runs ntpdate once an hour.
As I said they blocked ntp requests going outside, so ntpdate doesn't work.
 
Old 09-04-2015, 01:21 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If you install ntpd you can let it sync (to nanosecond accuracy, if required) to GPS time if you can see the sky and can afford a $25 GPS dongle.
Then you are your own source of the correct time. You could also broadcast it to others, if they request it and you have a little spare bandwidth.

If you want super-accuracy, you need a GPS dongle with a 1PPS output, and a (very) little hardware hacking (Eg. install a wire to make a connection from the GPS receiver to a GPIO pin on the Pi) might be needed.

I once had a Raspberry Pi in the attic syncing ntpd from a cheap GPS dongle. Only accurate to 1second, as I had no 1PPS signal. Fun project though.

Lots more info here:

http://www.catb.org/gpsd/gpsd-time-service-howto.html

Have fun, and maybe let us know how you get on.
 
Old 09-04-2015, 02:07 PM   #5
ardabro
Member
 
Registered: May 2015
Location: Katowice, Poland
Distribution: Debian, Ubuntu
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tredegar View Post
If you install ntpd you can let it sync (to nanosecond accuracy, if required) to GPS time if you can see the sky and can afford a $25 GPS dongle.
Sounds good!
Fortunately I ordered my first Pi2 two days ago

Thanks!
 
Old 09-04-2015, 03:26 PM   #6
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
Ntpdate uses another port when run from a regular user.
 
Old 09-05-2015, 04:30 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Isn't there some secure ntp that should not be easily blocked?

Wonder why they block ntp?
 
Old 09-08-2015, 05:02 AM   #8
ardabro
Member
 
Registered: May 2015
Location: Katowice, Poland
Distribution: Debian, Ubuntu
Posts: 37

Original Poster
Rep: Reputation: Disabled
they claim it is due to some recent attacks (for me they seem not to be security experts - they just heard sth and are afraid):

https://en.wikipedia.org/wiki/Networ...urity_concerns
 
  


Reply

Tags
ntp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aix server time jumps advanced by 1 hour when sync with ntp geekslinux AIX 21 04-01-2014 08:52 AM
How to make my system time to sync with ntp server without using client software? ybsshweta Linux - Newbie 14 01-30-2013 06:24 AM
Unable to sync time NTP server Rohit_4739 Linux - Newbie 5 04-10-2012 08:44 AM
NTP time sync with windows 2000 AD time csghosh Linux - Enterprise 7 02-24-2012 03:46 PM
[SOLVED] Slackware server - ntp time sync stops after a day tennis_slacker Slackware 81 08-04-2010 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration