统信UOS V20(1070a)版本配置NTP服务端

1、安装NTP服务需要先安装ntp-4.2.8p15-3.uelc20.02.x86_64.rpm、ntp-doc-4.2.8p15-3.uelc20.02.noarch.rpm,安装这两个包需要安装autogen-libopts-5.18.12-9.uelc20.2.x86_64.rpm。

2、安装好后,修改ntp配置文件,vi /etc/ntp.conf,保留以下配置
driftfile /var/lib/ntp/drift
server 127.127.1.0
fudge 127.127.1.0 startum 10
tos maxclock 5
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
server 192.168.x.x
server 192.168.x.x为上层时间服务器。
配置文件中的
restrict default nomodify notrap nopeer noepeer noquery
restrict source nomodify notrap noepeer noquery
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
crypto
都注释掉。

3、防火墙需要放通时间服务,或关闭防火墙systemctl stop firewalld。

4、可以在其他设备上用ntpdate -d ntp服务器IP来测试NTP服务端是否正常。

5、可以在服务端通过tcpdump -i 网卡接口 host 客户端IP and port 123 -nnv抓包看是否有包过来,如果没有包,则可能为中间链路有ACL拦截。

统信UOS V20(1070e)版本配置NTP服务端,参见链接:https://www.wxcn.com/?p=24880