Files
debian/modules/config.sh
2025-10-05 15:25:15 +02:00

35 lines
708 B
Bash
Executable File

#!/bin/bash
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