jdot
Posts: 4
Joined: Tue Apr 10, 2018 2:58 pm

Port 123 blocked, how to set time?

Fri Apr 20, 2018 5:41 pm

My work organization has port 123 blocked. Any good alternate methods for setting the time?

User avatar
topguy
Posts: 5776
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Port 123 blocked, how to set time?

Fri Apr 20, 2018 6:13 pm


User avatar
DougieLawson
Posts: 36142
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Port 123 blocked, how to set time?

Fri Apr 20, 2018 8:29 pm

jdot wrote:
Fri Apr 20, 2018 5:41 pm
My work organization has port 123 blocked. Any good alternate methods for setting the time?
Do they have a local NTP/SNTP server inside your work LAN? Go and ask the Network Admin.

You could get an RTC add-on and set the time on that on a network where time servers aren't blocked before carrying your RPi into your work system.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

W. H. Heydt
Posts: 10887
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Port 123 blocked, how to set time?

Sat Apr 21, 2018 1:45 am

Contact the network admin and request that the block on that port be removed. The worst that will happen is that the admin says, "No."

TinRobot
Posts: 13
Joined: Thu Apr 12, 2018 10:12 pm

Re: Port 123 blocked, how to set time?

Sat Apr 21, 2018 8:13 pm

I cannot offer any solution to your problem as I suspect that I am having the same problem.
As a linux newbie I have been struggling to figure out why I cannot get my Pi 3B to pickup the correct time from the network servers. I have set the proper options in raspi-config, REPEATEDLY and still cannot get it to work. I have to reset time and date from the command line every time.
LOL. Oh well, it has become another learning experience. Your post has given me another lead and another thing to learn.
So does anyone know how I would check "ports blocked" on the wifi of a home internet connection?

drgeoff
Posts: 9812
Joined: Wed Jan 25, 2012 6:39 pm

Re: Port 123 blocked, how to set time?

Sat Apr 21, 2018 8:30 pm

TinRobot wrote:
Sat Apr 21, 2018 8:13 pm
I cannot offer any solution to your problem as I suspect that I am having the same problem.
As a linux newbie I have been struggling to figure out why I cannot get my Pi 3B to pickup the correct time from the network servers. I have set the proper options in raspi-config, REPEATEDLY and still cannot get it to work. I have to reset time and date from the command line every time.
LOL. Oh well, it has become another learning experience. Your post has given me another lead and another thing to learn.
So does anyone know how I would check "ports blocked" on the wifi of a home internet connection?
I'd say the chance of you winning the lottery is higher than the probability that the port is blocked on your home Wi-Fi router.

What other things on the internet are you able and not able to access?

epoch1970
Posts: 3692
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Port 123 blocked, how to set time?

Sat Apr 21, 2018 8:51 pm

The htpdate package might help in this case, it looks for time in HTTP headers.
It is not as accurate as NTP, resolution is to the second.

To check if your machine can get the time via ntp over the Internet, you can use this amazing one-liner:

Code: Select all

date -d@$((0x`printf c%47s|nc -uw1 ntp.metas.ch 123|xxd -s40 -l4 -p`-64#23GDW0))
You should get something like this, unless the port is blocked:

Code: Select all

root@berck:~# date -d@$((0x`printf c%47s|nc -uw1 ntp.metas.ch 123|xxd -s40 -l4 -p`-64#23GDW0))
Sat Apr 21 22:48:31 CEST 2018
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Beginners”