From d8563be38b2fa047725ee85c7330bdf775101cdd Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Dec 2024 04:27:36 -0800 Subject: [PATCH] Disable MOTD advertisements (#2457) Disables MOTD advertisements which use a script to send server information in `wget` headers to Canonical. --- setup/system.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/system.sh b/setup/system.sh index 7467a72c..dd366401 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -83,6 +83,13 @@ fi # (See https://discourse.mailinabox.email/t/journalctl-reclaim-space-on-small-mailinabox/6728/11.) tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day +# ### Improve server privacy + +# Disable MOTD adverts to prevent revealing server information in MOTD request headers +# See https://ma.ttias.be/what-exactly-being-sent-ubuntu-motd/ +tools/editconf.py /etc/default/motd-news ENABLED=0 +rm -f /var/cache/motd-news + # ### Add PPAs. # We install some non-standard Ubuntu packages maintained by other