various improvements

This commit is contained in:
julien
2025-10-05 15:25:15 +02:00
parent 753e047fa6
commit 29bbd3d82d
4 changed files with 36 additions and 11 deletions

View File

@@ -4,7 +4,31 @@ echo
echo " => Configuration"
echo
if [ $profile = server ]; then
# Firewall basic configuration
ufw default deny incoming
ufw default allow outgoing
# Open needed ports
ports="ssh
http
https
imap
imaps
smtp
smtps"
for i in $ports
do
ufw allow $i
done
fi
if [ $profile = desktop ]; then
# Firewall configuration
ufw default deny incoming
ufw default allow outgoing
# Disable all managed interfaces excerpt loopback from /etc/network/interfaces file to allow NetworkManager to manage them
sed -i '/# The primary network interface/Q' /etc/network/interfaces
fi