by cyounkins on 12/29/22, 8:14 PM with 72 comments
by CaliforniaKarl on 12/29/22, 11:42 PM
DHCP option 42 (defined in RFC 2132) can be used to specify multiple NTP server IPv4 addresses.
(There’s also DHCP option 4, but that’s used to specify the IP for the older RFC 868 time protocol.)
DHCPv6 has option 31 for SNTP (via deprecated RFC 4075), and option 56 for NTP (via RFC 5908).
So, that would probably be the best option: Get an NTP address from DHCP or DHCPv6, use that to set your clock, bring up DNS over TLS/HTTPS, re-configure NTP with your preferred source, re-sync your clock, and then continue booting!
by CGamesPlay on 12/30/22, 6:29 AM
Of all the validations, this one seems like the one that causes problems in edge cases most frequently. I'm definitely not saying that expiry times should be ignored by default; just that client should have the option to do it.
This is obviously a problem for embedded devices, but it even goes to the browser level: when a certificate expired yesterday but is otherwise valid, I as a user want to be able to ignore that and only that error, particularly for a pinned certificate, since it's more likely to be incompetent sysadmin than malicious attacker.
by jedisct1 on 12/29/22, 9:27 PM
Or add cert_ignore_timestamp=true to the main configuration file. Initially, cert expiration won't be checked, but as soon as a DNS server will be reachable, this feature will automatically disable itself.
This is for dnscrypt-proxy. Alternative clients may have something similar.
by raggi on 12/30/22, 6:30 AM
by mvip on 12/30/22, 8:45 AM
The best workaround that we've found is to use the date in a HTTP Header to set the initial time (if we detect this condition):
$ curl -sI http://api.screenlyapp.com | grep Date
Date: Fri, 30 Dec 2022 08:43:56 GMT
With this set, you should be able to trigger the initial NTP service to start and set the date.
There's a Rust library here that can parse these dates for you: https://docs.rs/httpdate/0.3.2/httpdate/
by miyuru on 12/30/22, 5:13 AM
Google, Cloudflare and Facebook has vanity IPv6 address, pretty sure they are all static anycast IPs.
time.google.com - 2001:4860:4806::
time.cloudflare.com - 2606:4700:f1::123
time.facebook.com - 2a03:2880:ff0c::123
by dblitt on 12/30/22, 5:57 AM
At my high school, we had laptop carts that were notorious for losing their time, and nobody could log in because they were bound to AD over wifi. The system was offline because it would reject the RADIUS certificate of the wifi network due to the time being wrong. We had to manually log in as local admin to change the time or plug them all into ethernet until they could connect to NTP.
by LinuxBender on 12/29/22, 9:05 PM
by KirillPanov on 12/30/22, 9:54 AM
You can't (usefully) tunnel NTP inside of wireguard, because if your clock is wrong your peers won't talk to you anymore.
This is my personal pet peeve.
IMHO the wireguard handshake needs to be extended to allow one peer (the one that didn't reboot) to reply to a packet with a non-monotonically-increasing nonce with some signal saying "hey, here is the last nonce I got from you". Obviously this reply would be encrypted.
Then hazmat-free hardware could use these replies to reset its nonce (for that particular peer only) if we haven't had a successful handshake with that peer since the last reboot and/or the system clock is implausible. Obviously this behavior would be off-by-default. I would enable it for my batteryless routers.
by bobdvb on 1/3/23, 10:57 AM
Alternatively it would be good to use an anycast IP for NTP. This is normally a bad idea because it makes calculating skew hard/unreliable, but that really should just mean a poorly sync'ed clock. So set the Anycast clock to be an intentionally high/poor Stratum score, list this along with a DNS based address so it's used until the encrypted DNS can be resolved with a better Stratum score.
So, Dear Akamai/Cloudflare/MANGA/etc. please provide a high stratum, Anycast address for basic, approximate NTP.
by gonzo on 12/30/22, 7:44 AM
by rsimmons on 12/30/22, 3:27 AM
by tristor on 12/30/22, 5:50 AM
They do. Cloudflare does anyway. time.cloudflare.com is backed by a set of anycasted IPs covering around 275 POPs.
by Joel_Mckay on 12/30/22, 7:52 AM
Rookie mistake, like not using UTC time on the servers. =)
by thayne on 12/30/22, 7:40 AM
by remram on 12/30/22, 6:27 PM
by eniac111 on 12/30/22, 8:50 AM
by notwokeno on 1/3/23, 11:00 AM
by exabrial on 12/30/22, 12:38 AM
DNS needs to be connectionless; it’s building block protocol for TCP. DnsCurve is much closer to what we actually need.