1.1. 配置文件:/etc/ntp.conf

  • driftfile 文件路径 系统时间与BIOS事件的偏差记录 driftfile /etc/ntp/drift

  • restrict 控制相关权限。 语法为: restrict IP地址 mask 子网掩码 参数 其中IP地址也可以是default ,default 就是指所有的IP 参数有以下几个:

    • ignore :关闭所有的 NTP 联机服务
    • nomodify:客户端不能更改服务端的时间参数,但是客户端可以通过服务端进行网络校时。
    • notrust :客户端除非通过认证,否则该客户端来源将被视为不信任子网
    • noquery :不提供客户端的时间查询:用户端不能使用ntpq,ntpc等命令来查询ntp服务器
    • notrap :不提供trap远端登陆:拒绝为匹配的主机提供模式 6 控制消息陷阱服务。陷阱服务是 ntpdq 控制消息协议的子系统,用于远程事件日志记录程序。
    • nopeer :用于阻止主机尝试与服务器对等,并允许欺诈性服务器控制时钟
    • kod : 访问违规时发送 KoD 包。 restrict -6 表示IPV6地址的权限设置。
  • server 时间源 语法为:server 时间源IP/域名 参数 参数:

    • prefer : 优先级,配置该参数优先作为时间源
    • iburst :
Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-01-02 09:51:11
鼓励一下

results matching ""

    No results matching ""