建站学院

铸就企业 服务社会 成就自己

中危 检查是否规范NTP配置

发布时间:2026-05-05点击数:1

风险描述

ntp配置不规范:缺少restrict -4 default 配置

解决方案

1、编辑`/etc/ntp.conf`:添加以下信息`

# 检查是否规范NTP配置
restrict -4 default kod nomodify notrap nopeer noquery
# 仅IPv6环境需要
restrict -6 default kod nomodify notrap nopeer noquery

3、启用并重启:`systemctl enable --now ntpd`

温馨提示

正确配置ntp可确保时间同步正常工作并提升日志一致性