Our ISP is blocking the NTP Protocol. No matter what NTP server we put it doesn't update the time.
/ip firewall nat
add action=src-nat chain=srcnat protocol=udp src-port=123 to-ports=12300
It is "quite common" that an ISP blocks all traffic from UDP port 123
clients running old/unpatched/wrongly configured NTP servers
these have been used for DDoS attacks
a src-nat that translates port 123 to something else (e.g. 12300)
/ip firewall nat
add action=src-nat chain=srcnat out-interface-list=WAN protocol=udp src-port=123 to-ports=12300
If you were asking why I would buy something, I had unrelated reasons that I desired a local NTP server (stuff that had no internet connection at all).Why buy something instead of use the NTP package also available on RouterOS???
Why buy something instead of use the NTP package also available on RouterOS???
Well, that box (and also the LeoNTP that I use) provides time info "by itself" while the RouterOS package can only track other systems that untimately derive from such a source.Why buy something instead of use the NTP package also available on RouterOS???
/system/gps/set set-system-time=yes
NTP Server installed on RouetrOS 6.48.6 do not reply to time requests if internal clock is not synced with external NTP server...
is there anything wrong RouterOS "gps" package
Uhm, no? ISPs should not, ever, be filtering traffic. Not their responsibility. If my ISP blocks port 123 (or any port for that matter), I'll be cancelling services very promptly thereafter.Come on guys! It is "quite common" that an ISP blocks all traffic from UDP port 123
Well, what is at least wrong with that is that it uses the NMEA output strings from the GPS and not the PPS (pulse per second) signal.Possibly stupid question, but if you're buying some extra hardware, is there anything wrong RouterOS "gps" package, cheap USB GPS receiver and then in RouterOS:
?Code: Select all/system/gps/set set-system-time=yes
Hi,
Well, what is at least wrong with that is that it uses the NMEA output strings from the GPS and not the PPS (pulse per second) signal.
That means it is "really inaccurate" (at least 300ms offset, I guess). An NTP server on internet will work much better than that package (and a USB GPS dongle).
There are some devices with built-in GPS function but I think even those do not have PPS support. But I am not sure about that.
A dedicated device like shown above or LeoNTP that I have will maintain time with nanosecond precision and will deliver it over the network with microsecond precision.
Happens all the time. I see you're in SA like me. My ISP is ClearAccess, and they even block ssh (tcp port 22), telnet (tcp port 23) and winbox (tcp 8291).. Whether it's just badly implemented rules intended for transit infrastructure somehow affecting me as a client, is irrelevant I guess. Point is, I can't use those ports, they're blocked on the WAN side even if my firewall is open.Uhm, no? ISPs should not, ever, be filtering traffic. Not their responsibility. If my ISP blocks port 123 (or any port for that matter), I'll be cancelling services very promptly thereafter.
The problem is not "MikroTik gps package is bad", but "using a USB GPS dongle as time reference is bad". So those Openwrt packages will perform equally as bad as the gps package.Hi,
I would say for normal network/server troubleshooting a sub second accuracy is enough, especially if you synchronize everything from the same source.
No you shouldn´t advertise that on the Internet as your public stratum 1 server and if you are an enterprise you should probably buy at least two Meinbergs (~10k).
If not, here is a link for any Openwrt capable cheap router: https://openwrt.org/docs/guide-user/services/ntp/gps, but the Mikrotik gps support would be probably fine as well.
W
Yes, you are right, both have the same accuracy, which is not as high as it could be with a PPS signal received over GPIO. But the real point is: you don´t _need_ more accuracy for the simple usecase of normal network troubleshooting or setting your laptops clock. Accuracy to the second is mostly OK. And if you are so precise, that you want to compare millisecond timestamps, you can still do it inside your network, which is synchronised from the same, relatively unprecise source.The problem is not "MikroTik gps package is bad", but "using a USB GPS dongle as time reference is bad". So those Openwrt packages will perform equally as bad as the gps package.Hi,
I would say for normal network/server troubleshooting a sub second accuracy is enough, especially if you synchronize everything from the same source.
No you shouldn´t advertise that on the Internet as your public stratum 1 server and if you are an enterprise you should probably buy at least two Meinbergs (~10k).
If not, here is a link for any Openwrt capable cheap router: https://openwrt.org/docs/guide-user/services/ntp/gps, but the Mikrotik gps support would be probably fine as well.
W
To solve it, you need one of the specialized NTP server devices shown above. They use PPS sync internally.
An alternative might be to use a raspberry pi with a GPS receiver. That will allow GPS time WITH PPS signal. I have 2 pi's with GPS (one pi 1 and one pi2), works perfectly. Yes it takes some time and effort to set it up.
The problem is not "MikroTik gps package is bad", but "using a USB GPS dongle as time reference is bad". So those Openwrt packages will perform equally as bad as the gps package.
To solve it, you need one of the specialized NTP server devices shown above. They use PPS sync internally.
Accuracy to the second is mostly OK.
pe1chl,Come on guys! It is "quite common" that an ISP blocks all traffic from UDP port 123, because they have been confronted with clients running old/unpatched/wrongly configured NTP servers and these have been used for DDoS attacks. Don't act as if this is impossible or silly.
Usually they block only port 123 on the client side and it is possible to get NTP service from others by doing a src-nat that translates port 123 to something else (e.g. 12300).
So your NTP requests will go out as your_address:12300 -> server_address:123 and these are not blocked.
To do this you can add a rule like this:and see if there is any difference.Code: Select all/ip firewall nat add action=src-nat chain=srcnat protocol=udp src-port=123 to-ports=12300
If not, the blocking may be more complicated and a VPN may be required. Or a talk to the ISP.
Yes confirmed by the ISP they are blocking it form their firewall. The same Mikrotik when we change it to another ISP like 4G, ADSL the NTP client works like charm.Have you simply ask your ISP if is really blocked and what time server you must use?
Have you check if the problem is not the client?
Have you check if the problem is your settings on devices?
My apology. Did you mean you can't see my reply?Did you try the improved rule that was a couple of postings later? The initial try that you quote there was not correct.
I tried this rule: /ip firewall natDid you try the improved rule that was a couple of postings later? The initial try that you quote there was not correct.
It is confirmed that the ISP is blocking NTP protocol and they will not do anything to solve it.
The same mikrotik router when we plug it to 4G or ADSL or any other provider the NTP client synced like a charm.
I guess I have to do it by VPN and I need your help to configure it please.
/routing table add name=NTP fib
/ip firewall mangle
add action=mark-routing new-routing-mark=NTP chain=output \
dst-port=123 protocol=udp
/ip route
add dst-address=0.0.0.0/0 gateway=wireguard1 table=NTP
Not really... My GNSS antenna has 100 feet of good coax, could easily triple it. Also the serial cable at 9600 or 4800 baud that GPS runs at can be very, very long without issues.There must be practical limits on the length of the GPS antenna's coax cable back to the receiver. Parasitic dB losses, interference, etc. Coupled with the short maximum practical length of USB cables, there are buildings where you can't even get out to a nearby wall with a USB GPS clock.
It is confirmed that the ISP is blocking NTP protocol and they will not do anything to solve it.
If they won't provide a time server of their own to redress the loss of service, I'd select another ISP, if only since the X.509 certificates behind TLS and multiple VPN protocols are time-based. Those being essential Internet services these days, accurate time is ipso facto also an essential Internet service. I'd give them a pass if they chose a better protocol than NTP, but to provide no time sync service at all is inexcusable.
The same mikrotik router when we plug it to 4G or ADSL or any other provider the NTP client synced like a charm.
If any of those other networks are available at the problem location, you could configure the router with both, then route NTP alone to the alternate network. As a bonus, you then have the ability to fail-over to the alternate network when the main one goes down.
I guess I have to do it by VPN and I need your help to configure it please.
The topic is well-covered elsewhere already. There's a whole section on it in the docs. This forum has many guides, and there are third-party sources if you don't like any of those options.
The only element that varies on this point is whether you want to route just NTP to this VPN or send all traffic over it. It's easier to route everything, and it may give service benefits, such as to avoid any other ridiculous restrictions your ISP imposes. There are many guides for doing that.
If you wish to route NTP alone, something like this should work:
Code: Select all/routing table add name=NTP fib /ip firewall mangle add action=mark-routing new-routing-mark=NTP chain=output \ dst-port=123 protocol=udp /ip route add dst-address=0.0.0.0/0 gateway=wireguard1 table=NTP
That example assumes you've chosen WireGuard, which in turn assumes you're on RouterOS 7, and also that your ridiculous ISP doesn't block that, too. If you're forced to some other VPN type by any of these considerations, modify the gateway parameter to suit.
When I tried the first line of your commands: /routing table add name=NTP fib it rose an error on "table". Searched the documentations and no luck.
Did you ask your ISP if they have an NTP server you can use?It is confirmed that the ISP is blocking NTP protocol and they will not do anything to solve it. I have to do it from my side.
Apologize, I should have mentioned my OS version it is 6.49.6. It is connected to an external radius server in which it is not compatible with OS7 yetWhen I tried the first line of your commands: /routing table add name=NTP fib it rose an error on "table". Searched the documentations and no luck.
The command is for RouterOS 7. The whole routing infrastructure is changed around relative to v6. (Details)
Yes it is confirmed. they don't have and I have been running after them for weeks now to put a CPU just to work as NTP server.Did you ask your ISP if they have an NTP server you can use?It is confirmed that the ISP is blocking NTP protocol and they will not do anything to solve it. I have to do it from my side.
Apologize, I should have mentioned my OS version it is 6.49.6.The whole routing infrastructure is changed around relative to v6. (Details)
Yeah.. It doesn't make sense...That fits into the crazy department - they don't provide a service that damn near everyone uses, and then block any attempt to use any one of the many available public NTP servers.
Not really. Routerboards don't have on-board real-time clocks so after they boot, they're unsynchronized. And need external (NTP!) source to get going. Only after that they can serve as NTP servers (the source can become unavailable).Ignoring the accuracy, until humans life is not involved, you can sync routerboard clock routing the IP used as NTP server
(or directly all your LAN IPs used ad NTP server) on a VPN, and using DHCP server for provide NTP service to all your LAN devices...
... you can sync routerboard clock routing the IP used as NTP server ... on a VPN...
The situation with a Raspberry Pi is exactly the same as with a Routerboard: it does not have a real-time clock, it needs an NTP server to sync to, and after a reboot it will usually revert to some time in the near past (that was saved to the flash during the last run, which it does every now and then).Not really. Routerboards don't have on-board real-time clocks so after they boot, they're unsynchronized. And need external (NTP!) source to get going. Only after that they can serve as NTP servers (the source can become unavailable).Ignoring the accuracy, until humans life is not involved, you can sync routerboard clock routing the IP used as NTP server
(or directly all your LAN IPs used ad NTP server) on a VPN, and using DHCP server for provide NTP service to all your LAN devices...
Which means that one needs another device to serve as (poor accuracy) NTP server ... not sure if a raspberry pi would do (does it have RTC?).
No, but they are simple and cheap to add.. Adding a GNSS module instead of an RTC would provide very accurate time, and could then serve time for the network..Which means that one needs another device to serve as (poor accuracy) NTP server ... not sure if a raspberry pi would do (does it have RTC?).
You can do the same thing with a MikroTik router that has USB.No, but they are simple and cheap to add.. Adding a GNSS module instead of an RTC would provide very accurate time, and could then serve time for the network..