Browse Source

disabled local name resolution globally

Toastie 1 year ago
parent
commit
c5c9701a9f
1 changed files with 6 additions and 7 deletions
  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/