【ntp】为什么ntp服务需要开启双向(服务器端和客户端) udp/123端口?

ntpd服务作为既可以作ntpServer,又可以作ntpClient ,只是配置上稍有不同。

ntpd服务运行时需要开启双向(服务器端和客户端) udp/123端口。


iptables:

# yum install  iptables  iptables-services

# iptables  -A INPUT -p udp  -m udp --dport  123   -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

# iptables  -A  OUTPUT -p udp  -m udp --dport  123   -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

#  systemctl restart iptables.service


firewalld:

# yum  -y install firewalld

# firewall-cmd --zone=public  --add-port=123/udp --permanent

# firewall-cmd --reload



What are the iptables rules to permit ntp?

https://superuser.com/questions/141772/what-are-the-iptables-rules-to-permit-ntp


Why does NTP require bi-directional firewall access to UDP port 123?

https://superuser.com/questions/762579/why-does-ntp-require-bi-directional-firewall-access-to-udp-port-123


Troubleshooting NTP

http://support.ntp.org/bin/view/Support/TroubleshootingNTP


【chrony】CentOS7.2 上chrony的安装与配置

https://www.jianshu.com/p/a8976ed21422


【ntp】CentOS7.x ntpd作为ntpServer ntpClient 的安装配置

https://www.jianshu.com/p/8513a4bbd257


【systemd+iptables】用systemd定义一个iptables防火墙系统服务

https://www.jianshu.com/p/96d179f4e444


【firewalld】CentOS 上的 firewalld 简明指南

https://www.jianshu.com/p/2cd238f6df71

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容