Compare commits

...

3 Commits

3 changed files with 13 additions and 4 deletions

View File

@ -43,7 +43,8 @@ CMD_LIST_CONFIG_JSON=$(cat <<EOF
{
"section": "NETWORK DEBUG",
"items": [
{"label": "Port debug", "cmd": "ss -tulpn | grep {port_number}}"},
{"label": "Port debug", "cmd": "ss -tulnw | column -t"},
{"label": "Port tcp opened ext", "cmd": "ss -tlnw | grep -v -E '(127\.0\.0\.1|::1)' | column -t"},
{"label": "Unlock 1024 port for not Root user", "cmd": "setcap 'cap_net_bind_service=+ep' /usr/lib/jellyfin/bin/jellyfin"}
]
},

View File

@ -1,7 +1,8 @@
#!/bin/bash
# shellcheck disable=SC2034
# ADMIN MAIL
CONFIG_DEB_INSTALL_SERVER_ADMIN_MAIL="admin@frogg.fr"
# SMTP INSTALLATION
CONFIG_DEB_INSTALL_SERVER_SMTP_HOST="smtp-auth.mailprotect.be"
CONFIG_DEB_INSTALL_SERVER_SMTP_PORT="587"
@ -31,6 +32,8 @@ CONFIG_DEB_INSTALL_JSON='[
{"id": "htop_pkg", "label": "Installer HTOP", "type": "pkg", "params": "htop"},
{"id": "msmtp_pkg", "label": "Installer MSMTP", "type": "pkg", "params": "msmtp"},
{"id": "net-tools_pkg", "label": "Installer net-tools", "type": "pkg", "params": "net-tools"},
{"id": "nfs-common_pkg", "label": "Installer nfs-common", "type": "pkg", "params": "nfs-common"},
{"id": "smbclient_pkg", "label": "Installer smbclient", "type": "pkg", "params": "smbclient"},
{"id": "zabbix", "label": "Installer Zabbix Agent", "type": "sys", "params": "zabbix"},
{"id": "apparmor_pkg", "label": "Installer AppArmor (Paquets)", "type": "pkg", "params": "apparmor"},
{"id": "fail2ban_pkg", "label": "Installer Fail2Ban", "type": "pkg", "params": "fail2ban"},

View File

@ -324,12 +324,15 @@ do_deb_sys_ufw() {
# 1. On montre l'existant SANS y toucher
current_rules=$($SUDO ufw status | grep -v "(v6)" | grep "ALLOW" | awk '{print $1}' | cut -d'/' -f1 | tr '\n' ' ')
if [[ -n "$current_rules" ]]; then
echo -e "${COLOR_YELLOW}Ports actuellement ouverts : ${COLOR_WHITE}${current_rules}${NONE}"
msg_warning "Ports actuellement ouverts : ${COLOR_WHITE}${current_rules}${NONE}"
msg_warning "Toutes les autres règles existantes seront supprimées"
msg_warning "Veuillez saisir tous les ports à ouvrir"
msg_warning "Même si il étaient déjà ouvert avant.\n"
fi
msg_info "Liste des ports tcp sortant ouvert"
ss -tlnw | grep -v -E '(127\.0\.0\.1|::1)' | column -t
# 2. Boucle de saisie (on remplit uniquement le tableau en mémoire)
while true; do
read -rp "Entrez un port à ouvrir (ou 'f' pour terminer) : " input_port
@ -481,7 +484,9 @@ EOF
}
do_deb_sys_mail(){
read -rp "Mail admin : " m;
local m
read -rp "Mail admin [${CONFIG_DEB_INSTALL_SERVER_ADMIN_MAIL}]: " m;
m=${m:-$CONFIG_DEB_INSTALL_SERVER_ADMIN_MAIL}
echo "export ADMIN_MAIL=\"$m\"" | $SUDO tee -a /etc/environment > /dev/null
# shellcheck disable=SC2034
export ADMIN_MAIL=$m