-
在服务器端设置时间服务器
Allow NTP client access from local network.
allow 192.168.0.0/16
allow 192.168.177.134
Select which information is logged.
log measurements statistics tracking
2.创建防火墙区域与服务,并接入ens160创建区域
1.创建新区域
[root@Joghsonro~]# firewall-cmd --new-zone=testzone --permanent
success
[root@Joghsonro ~]# firewall-cmd --reload
success
[root@Joghsonro ~]# firewall-cmd --get-zones
block dmz drop external home internal nm-shared public testzone trusted work
2.创建新服务
[root@Joghsonro~]# firewall-cmd --new-service=testservice --permanent
success
[root@Joghsonro~]# firewall-cmd --reload
success
3.将ens60接入新区域
[root@Joghsonro~]# firewall-cmd --zone=testzone --change-interface=ens160 --permanent
The interface is under control of NetworkManager, setting zone to 'testzone'.
success
[root@Joghsonro~]# firewall-cmd --reload
success
[root@Joghsonro~]#
5.使用netstat命令过滤chrony服务发现端口号为123,将端口号写入testservice服务
[root@Joghsonro~]# netstat -lntup | grep chrony
udp 0 0 0.0.0.0:123 0.0.0.0:* 36630/chronyd
udp 0 0 127.0.0.1:323 0.0.0.0:* 36630/chronyd
udp6 0 0 ::1:323 :::* 36630/chronyd
3.配置客户端
1.写入服务器端地址并打开日志
[root@Joghsonro~]
# vim /etc/chrony.conf
[root@Joghsonro~]
# systemctl restart chronyd.service
[root@Joghsonro~]
#