Jas*_*net 0 lubuntu privacy motd
在wireshark 日志中,我发现我的 Lubuntu 18.04 调用了Amazon servers。看到这个日志:
17 192.168.1.1 192.168.1.13 DNS 118 Standard query response 0x0e33 A motd.ubuntu.com A 54.194.229.79 A 52.18.210.215 OPT
18 192.168.1.1 192.168.1.13 DNS 142 Standard query response 0xebef AAAA motd.ubuntu.com AAAA 2a05:d018:91c:3200:4a81:cf9a:267b:97df AAAA 2a05:d018:91c:3200:5869:6d03:bf3a:f619 OPT
19 192.168.1.13 54.194.229.79 TCP 74 50656 > 443 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=4010357077 TSecr=0 WS=128
20 54.194.229.79 192.168.1.13 TCP 74 443 > 50656 [SYN, ACK] Seq=0 Ack=1 Win=26847 Len=0 MSS=1380 SACK_PERM=1 TSval=2116889653 TSecr=4010357077 WS=128
21 192.168.1.13 54.194.229.79 TCP 66 50656 > 443 [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=4010357137 TSecr=2116889653
22 192.168.1.13 54.194.229.79 TLSv1.2 284 Client Hello
Run Code Online (Sandbox Code Playgroud)
它下载当天的一些消息(MOTD)。它是什么以及如何禁用此“功能”?
如果您查看一下,/etc/update-motd.d/您将看到负责使用信息更新 motd 的配置。
50-motd-news负责从 motd.ubuntu.com(由 Ubuntu 控制,但托管在 AWS,这就是 whois 显示亚马逊)中获取新闻的是-file。
只需删除50-motd-news-file,它将停止检查 motd 的新闻。
如果需要,您也可以删除该update-motd包。sudo apt remove update-motd将禁用所有自动 motd 更新,包括更新和重启通知。
此外,您应该更改ENABLED=1为ENABLED=0in /etc/default/motd-news。
我可以补充一下我是怎么想出来的。我做了一个grep -r 'motd.ubuntu.com' /etc/ 2>/dev/null. 这显示了上面提到的两个文件。
Aapt-cache search update-motd确认这是一个包,并man update-motd解释了它的工作原理:
/etc/update-motd.d/* 中的可执行脚本在每次登录时由 pam_motd(8) 作为 root 用户执行,并且这些信息连接在 /run/motd.dynamic 中。脚本执行的顺序由 run-parts(8) --lsbsysinit 选项决定(基本上是字母顺序,有一些注意事项)。
因此,删除任何单个脚本不会有害。如果需要,您甚至可以添加自己的。
| 归档时间: |
|
| 查看次数: |
956 次 |
| 最近记录: |