First sync

This commit is contained in:
2025-04-16 15:40:42 +02:00
parent 2a85dc2240
commit 76d0b4a98a
26 changed files with 970 additions and 2 deletions

31
09-Firewall/script.sh Normal file
View File

@ -0,0 +1,31 @@
#!/bin/sh
# Pour la configuration firewall
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NOCOLOR='\033[0m'
echo "${YELLOW} ** ${NOCOLOR} Début du script : 09-Firewall"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Installation composant"
echo "${NOCOLOR}"
apt install -y ufw >> /dev/null
echo "${YELLOW} * ${NOCOLOR} Installation composant : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Configuration"
echo "${NOCOLOR}"
ufw default deny incoming
ufw default allow outgoing
ufw allow 2222/tcp # Votre port SSH
ufw enable
echo "${YELLOW} * ${NOCOLOR} Configuration : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} ** ${NOCOLOR} Fin du script : 09-Firewall"
echo "${NOCOLOR}"