Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2021-09-08 09:51:44
Size: 342
Editor: Burathar
Comment:
Revision 3 as of 2021-09-08 15:07:29
Size: 738
Editor: Burathar
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
date -d@$((0x`printf c%47s|nc -uw1 10.254.253.201 123|xxd -s40 -l4 -p`-64#23GDW0)) date -d@$((0x`printf c%47s|nc -uw1 pool.ntp.org 123|xxd -s40 -l4 -p`-64#23GDW0))
Line 11: Line 11:
This doesn't work for autistic NTP servers like the one in Foritigate routers, because they dont understand that a space is the same as a NULL byte..
The longer, but more solid version:
{{{#!bash
date -d@$((0x`(printf "\x93"; printf '\0%.0s' {1..47}) |nc -uw1 192.168.9.1 123|xxd -s40 -l4 -p`-64#23GDW0))
}}}
For servers that don't accept ntpv2, but do ntpv4, try to replace `x93` with `xe3`
Line 13: Line 19:
date -r$((0x`printf c%47s|nc -uw1 ntp.metas.ch 123|xxd -s40 -l4 -p`-64#23GDW0)) date -r$((0x`printf c%47s|nc -uw1 pool.ntp.org 123|xxd -s40 -l4 -p`-64#23GDW0))

Testing an ntp server without ntpd

Source: http://seriot.ch/ntp.php

GNU Linux

date -d@$((0x`printf c%47s|nc -uw1 pool.ntp.org 123|xxd -s40 -l4 -p`-64#23GDW0))

This doesn't work for autistic NTP servers like the one in Foritigate routers, because they dont understand that a space is the same as a NULL byte.. The longer, but more solid version:

date -d@$((0x`(printf "\x93"; printf '\0%.0s' {1..47}) |nc -uw1 192.168.9.1 123|xxd -s40 -l4 -p`-64#23GDW0))

For servers that don't accept ntpv2, but do ntpv4, try to replace x93 with xe3

BSD

date -r$((0x`printf c%47s|nc -uw1 pool.ntp.org 123|xxd -s40 -l4 -p`-64#23GDW0))

Howto/NTP (last edited 2021-09-23 13:23:35 by Burathar)