Linux系统下如何使用NTP服务器?
  • 作者:zhijie
  • 时间:2023-03-03

  参数:

  ignore :关闭所有的 NTP 联机服务

  nomodify:客户端不能更改服务端的时间参数,但是客户端可以通过服务端进行网络校时。

  notrust :客户端除非通过认证,否则该客户端来源将被视为不信任子网

  noquery :不提供客户端的时间查询

  二、具体配置

  [root@linuxidc1 ~]# vim /etc/ntp.conf

  3 restrict default kod nomodify notrap nopeer noquery

  4 #restrict -6 default kod nomodify notrap nopeer noquery

  5 restrict default nomodify

  6 restrict 192.168.8.0 mask 255.255.255.0 nomodify

  11 restrict 127.0.0.1

  18 #server 0.rhel.pool.ntp.org

  19 #server 1.rhel.pool.ntp.org

  20 #server 2.rhel.pool.ntp.org

  21 server 192.168.8.70

  31 server 127.127.1.0 # local clock

  32 fudge 127.127.1.0 stratum 10

  [root@linuxidc1 ~]# /etc/init.d/ntpd restart

  Shutting down ntpd: [ OK ]

  Starting ntpd: [ OK ]

 2/3   首页 上一页 1 2 3 下一页 尾页
相关推荐
用户评论区