#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail if [[ $(id -u) -ne 0 ]] ; then echo "Ce script doit être lancé en root." ; exit 1 ; fi ufw reset ufw allow from 192.168.1.90 comment 'Pas de limite pour pour PC perso' ufw limit from 192.168.1.0/24 to any port 22 proto tcp comment 'sshd (limit)' ufw allow from 192.168.1.0/24 comment 'Trafic réseau local' ufw allow from any to any port 443 proto tcp comment 'Serveur web Apache/NextCloud' ufw allow from any to any port 9443 proto tcp comment 'Jellyfin https via Apache' ufw enable