【问题标题】:NTP does not handle restrict on pool server correctlyNTP 无法正确处理池服务器上的限制
【发布时间】:2013-07-31 19:11:18
【问题描述】:

如果我运行 ntp(通过 ntp.conf)受到严格限制,我不能将池用于服务器。为什么?因为对限制(允许访问池)的调用似乎是另一个 DNS 查找,它返回另一个 IP 值,而不是最初调用服务器时使用的 IP 值。请告诉我我错了/对此很愚蠢。

粗略示例(ntp.conf 的一部分):

server 0.debian.pool.ntp.org iburst
restrict default ignore
restrict -6 default ignore
restrict 0.debian.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery

这不起作用(我认为)因为对 0.debian.pool.ntp.org 的 DNS 调用返回不同的 IP 地址,因此通过(名称不佳)限制允许错误的 IP 地址。

【问题讨论】:

    标签: linux ntp ntpd


    【解决方案1】:

    使用内置的source alias/directive/whatever:

    restrict source nomodify notrap noquery
    

    更新后包含source 的文档:

    restrict source configures a template restriction automatically added
    at runtime for each association, whether configured, ephemeral, or
    preemptible, and removed when the association is demobilized.
    

    发件人:http://www.eecis.udel.edu/~mills/ntp/html/accopt.html#restrict

    【讨论】:

    • 不幸的是,我目前还没有解决这个问题。但我认为限制来源会向所有来源开放。
    • 我不确定“限制源向所有源开放”是什么意思。听起来您在说“限制来源将向世界开放”。我在答案中添加了source 的文档。我认为很明显,它只为“每个关联开放,无论是配置的、临时的还是可抢占的,并在关联解散时删除。”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    • 2016-05-15
    • 2014-09-02
    • 2022-01-23
    • 2015-10-18
    • 1970-01-01
    相关资源
    最近更新 更多