From b5b0131c49a3cf3afa0e4071d78935e2c8df4140 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 24 Dec 2023 23:23:29 +0100 Subject: [PATCH 1/4] hardening systemd security --- conf/systemd.service | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/conf/systemd.service b/conf/systemd.service index 7705193..939a604 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -15,5 +15,33 @@ Restart=always RestartSec=10 #EnvironmentFile=-/etc/sysconfig/AdGuardHome +# Sandboxing options to harden security +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=no +PrivateTmp=yes +PrivateDevices=no +RestrictNamespaces=no +RestrictRealtime=no +DevicePolicy=closed +ProtectClock=no +ProtectHostname=no +ProtectProc=invisible +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=no +ProtectKernelTunables=no +LockPersonality=no + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target From 639fc1b5c5580bcd377ff8d7366db59c2fd1fa3f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 24 Dec 2023 23:34:26 +0100 Subject: [PATCH 2/4] gnagnagna linter --- conf/systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/systemd.service b/conf/systemd.service index 939a604..d43f554 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -31,6 +31,7 @@ ProtectControlGroups=yes ProtectKernelModules=no ProtectKernelTunables=no LockPersonality=no +#SystemCallFilter= # Denying access to capabilities that should not be relevant for webapps # Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html From 03251686bd65a2f31f80a14aafdf0c82494bf5f8 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 24 Dec 2023 23:44:02 +0100 Subject: [PATCH 3/4] damn linter --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index d43f554..26cd235 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -31,7 +31,7 @@ ProtectControlGroups=yes ProtectKernelModules=no ProtectKernelTunables=no LockPersonality=no -#SystemCallFilter= +SystemCallFilter= # Denying access to capabilities that should not be relevant for webapps # Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html From 402ab0dba056c79706e3f49cdef5b52f999aa239 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 24 Dec 2023 22:48:56 +0000 Subject: [PATCH 4/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 360e9ac..653bc8c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ AdGuard Home is a network-wide software for blocking ads & tracking. After you s It operates as a DNS server that re-routes tracking domains to a "black hole", thus preventing your devices from connecting to those servers. It's based on software we use for our public AdGuard DNS servers -- both share a lot of common code. -**Shipped version:** 0.107.43~ynh1 +**Shipped version:** 0.107.43~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 00d1128..2fb3ee5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ AdGuard Home est un logiciel à l'échelle du réseau pour bloquer les publicit Il fonctionne comme un serveur DNS qui redirige les domaines de pistage vers un "trou noir", empêchant ainsi vos appareils de se connecter à ces serveurs. Il est basé sur un logiciel que nous utilisons pour nos serveurs DNS publics AdGuard - les deux partagent beaucoup de code commun. -**Version incluse :** 0.107.43~ynh1 +**Version incluse :** 0.107.43~ynh2 ## Captures d’écran