From 491e9db11fc3229d5baa716a8271c390faba87c1 Mon Sep 17 00:00:00 2001 From: titanz Date: Mon, 27 Jan 2025 21:54:51 +0100 Subject: [PATCH] add networkmanager hardening to sys-net --- fedora-minimal/sys-net.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fedora-minimal/sys-net.sh b/fedora-minimal/sys-net.sh index e38065a..6243558 100644 --- a/fedora-minimal/sys-net.sh +++ b/fedora-minimal/sys-net.sh @@ -45,6 +45,7 @@ download https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main sudo hostnamectl hostname 'localhost' sudo hostnamectl --transient hostname '' -# This breaks saving network settings with the Fedora 40 template rn, so I am commenting it out. -#sudo mkdir -p /etc/systemd/system/NetworkManager.service.d -#download https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf /etc/systemd/system/NetworkManager.service.d/99-brace.conf +sudo mkdir -p /etc/systemd/system/NetworkManager.service.d +download https://gitlab.com/divested/brace/-/raw/master/brace/usr/lib/systemd/system/NetworkManager.service.d/99-brace.conf /etc/systemd/system/NetworkManager.service.d/99-brace.conf +sudo sed -i 's@ReadOnlyPaths=/etc/NetworkManager@#ReadOnlyPaths=/etc/NetworkManager@' /etc/systemd/system/NetworkManager.service.d/99-brace.conf +sudo sed -i 's@ReadWritePaths=-/etc/NetworkManager/system-connections@#ReadWritePaths=-/etc/NetworkManager/system-connections@' /etc/systemd/system/NetworkManager.service.d/99-brace.conf