背景
买了一台 VPS ,安装 Debian 11 系统,使用systemd-timesyncd进行时间同步,即 NTP 服务。
网络细节:洛杉矶机房,接入 AS9929 ,IP 属于 AfriNIC ,广播到本机上,host 使用 PVE 系统。
现象
无法从 NTP Server 获取数据,报错如下:
systemd-timesyncd: Timed out waiting for reply from 162.159.200.1:123 (0.debian.pool.ntp.org).
已经做过的尝试
- 临时从 HE.NET 隧道 IPv6 ,目前走 IPv6 可以正常链接 NTP Server 进行时间同步。
- IDC/host 明确没有对网络做过任何限制。
- 使用 golang 写了手动获取 NTP 数据的程序,在其他 VPS 上正常运行,在此 VPS 上无法正常工作,但能解析 NTPServer 对应的 IP 地址。
- 使用 netcat 查看 udp 是否能连接外网,发现是正常的,如下。
nc -vz -u 8.8.8.8 443
Connection to 8.8.8.8 443 port [udp/https] succeeded!
nc -vz -u 0.hk.pool.ntp.org 123
Connection to 0.hk.pool.ntp.org (45.125.1.20) 123 port [udp/ntp] succeeded!
这个问题已经困扰我好几天了,真是个疑难杂症!