我在 debian scrap 中使用该ntp
软件包,ntpd 进程正在监听数百个未在服务器上配置的 rfc1918 地址。
看一下这个:
Mar 26 10:07:24 server ntpd[14701]: ntpd [email protected] Sun Oct 17 13:45:13 UTC 2010 (1)
Mar 26 10:07:24 server ntpd[14702]: proto: precision = 0.986 usec
Mar 26 10:07:24 server ntpd[14702]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen and drop on 1 v6wildcard :: UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 2 lo 127.0.0.1 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 3 eth0 66.xxx.xxx.xxx UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 4 eth0 192.168.1.1 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 5 eth0 192.168.1.2 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 6 eth0 192.168.1.3 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 7 eth0 192.168.1.4 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 8 eth0 192.168.1.5 UDP 123
...
...
...
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 499 eth0 192.168.2.240 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 500 eth0 192.168.2.241 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 501 eth0 192.168.2.242 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 502 eth0 192.168.2.243 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 503 eth0 192.168.2.244 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 504 tun0 10.13.37.1 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 505 tun1 10.13.42.2 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 506 lo ::1 UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 507 eth0 2600:xxxx::xxxx UDP 123
Mar 26 10:07:24 server ntpd[14702]: Listen normally on 508 eth0 fe80::xxxx UDP 123
我的配置文件:
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
ifconfig eth0
:
eth0 Link encap:Ethernet HWaddr f2:xx:xx:xx:xx:xx
inet addr:66.xxx.xxx.xxx Bcast:66.xxx.xxx.xxx Mask:255.255.255.0
inet6 addr: 2600:xxxx::xxxx/64 Scope:Global
inet6 addr: fe80::xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69898198 errors:0 dropped:0 overruns:0 frame:0
TX packets:55539406 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25263193357 (23.5 GiB) TX bytes:41787470527 (38.9 GiB)
Interrupt:76
有什么想法吗?
答案1
我没有完整的 pre-grep 输出,因为我的滚动缓冲区已满,但是:
# ip addr show dev eth0 |grep 192.168.[12]
inet 192.168.1.1/16 scope global eth0
inet 192.168.1.2/16 scope global secondary eth0
inet 192.168.1.3/16 scope global secondary eth0
inet 192.168.1.4/16 scope global secondary eth0
inet 192.168.1.5/16 scope global secondary eth0
...
这解决了它:
ip addr del 192.168.1.1/16 dev eth0
这很可能是我不久前对 openvpn 配置进行的一些摆弄的副作用。