Quellcode durchsuchen

disabled local name resolution globally

Toastie vor 8 Monaten
Ursprung
Commit
c5c9701a9f
1 geänderte Dateien mit 6 neuen und 7 gelöschten Zeilen
  1. 6 7
      bootstrap-bookworm.sh

+ 6 - 7
bootstrap-bookworm.sh

@@ -190,18 +190,17 @@ Gateway=$netGateway
 Broadcast=$netBroadcast
 DNS=$netDNS1
 DNS=$netDNS2
-LLMNR=no
-MulticastDNS=no
 NTP=$netNTP
 EOL
 fi
 
 ## Setup systemd resolver
-#apt-get install --yes systemd-resolved
-#rm /etc/resolv.conf
-#ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
-#systemctl enable systemd-networkd
-#systemctl enable systemd-resolved
+apt-get install --yes systemd-resolved
+echo -e "\n# Disable local name resolution"
+echo "LLMNR=no" >> /etc/systemd/resolved.conf
+echo "MulticastDNS=no" >> /etc/systemd/resolved.conf
+systemctl enable systemd-networkd
+systemctl enable systemd-resolved
 
 # Limit journald logging to 1 month, 1 GB in total and split files per week
 mkdir -p /etc/systemd/journald.conf.d/