#!/bin/sh # i1.is Server Hardening Script # Cheet says: Let's lock down your server! set -e echo "" echo "╔═══════════════════════════════════════════════════════════════╗" echo "║ i1.is Server Hardening ║" echo "║ Cheet says: Making your server Fort Knox! ║" echo "╚═══════════════════════════════════════════════════════════════╝" echo "" # Detect package manager if command -v apt >/dev/null 2>&1; then PKG_MGR="apt" INSTALL="apt install -y" UPDATE="apt update" elif command -v pacman >/dev/null 2>&1; then PKG_MGR="pacman" INSTALL="pacman -S --noconfirm" UPDATE="pacman -Sy" elif command -v yum >/dev/null 2>&1; then PKG_MGR="yum" INSTALL="yum install -y" UPDATE="yum update" else echo "Unsupported package manager" exit 1 fi echo "Detected package manager: $PKG_MGR" echo "" # Menu echo "What would you like to harden?" echo "" echo " 1) Install UFW + Fail2ban (firewall & intrusion prevention)" echo " 2) Harden SSH configuration" echo " 3) Install and configure automatic updates" echo " 4) Full hardening (all of the above)" echo "" echo " 0) Exit" echo "" printf "Select option [0-4]: " read -r choice