阻止 ntp 客户端监听

Ada*_*tan 3 security ntp time-server

我一直在尝试构建和配置 ntp 客户端和服务器,并ntp.conf 在客户端中使用了这一行:

restrict default ignore
Run Code Online (Sandbox Code Playgroud)

不过,我看到我的客户端正在侦听本地网络接口。从系统日志:

Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Listening on interface #1 wildcard, ::#123 Disabled
Listening on interface #2 vmnet8, fe80::250:56ff:fec0:8#123 Enabled
Listening on interface #3 lo, ::1#123 Enabled
Listening on interface #4 eth0, fe80::222:68ff:fe10:1529#123 Enabled
Listening on interface #5 vmnet1, fe80::250:56ff:fec0:1#123 Enabled
Listening on interface #6 lo, 127.0.0.1#123 Enabled
Listening on interface #7 eth0, 192.168.111.183#123 Enabled
Listening on interface #8 vmnet1, 172.16.139.1#123 Enabled
Run Code Online (Sandbox Code Playgroud)

0-1 被禁用,这很好。

使用的开放端口列表nmap -sUS -O 127.0.0.1

Starting Nmap 4.53 ( http://insecure.org ) at 2009-08-03 12:25 IDT
Interesting ports on localhost (127.0.0.1):
Not shown: 3195 closed ports
PORT     STATE         SERVICE
22/tcp   open          ssh
631/tcp  open          ipp
902/tcp  open          iss-realsecure-sensor
5432/tcp open          postgres
68/udp   open|filtered dhcpc
123/udp  open|filtered ntp
5353/udp open|filtered zeroconf
Device type: general purpose
Running: Linux 2.6.X
Run Code Online (Sandbox Code Playgroud)

如您所见,ntp正在侦听端口 123。为什么?

有任何想法吗?

乌迪

Ada*_*tan 7

答案似乎是所使用的协议类型:NTP 使用 UDP 协议,它是无连接的,因此需要一个开放的端口来接收来自请求后的服务器的时间。

我想我只需要保持该端口打开,因为 NTP 具有非常好的安全声誉。