PostServer update tested on Ubuntu 20.04.
This script will perform some post install tasks in just a few seconds.
First, download the script and make it executable:
curl -O https://raw.githubusercontent.com/blackwatercitadel/psu/main/postServerInstall.sh
chmod +x postServerInstall.sh
Then run it:
./postServerInstall.sh
When launched the script will automatically elevate to root (sudo).
DISABLE CLOUD-INIT
CHANGE TIMEZONE to America/New_York
COMPLETE SYSTEM UPDATE
INSTALL IFUPDOWN & NET-TOOLS
DISABLE & RESET UFW
DENY ALL INCOMING UFW
ALLOW ALL OUTGOING UFW
ALLOW SSH PORT 22 ONLY FROM 192.168.1.0/24
ENABLE UFW
DISABLE SSH ROOT LOGIN
ADD ROOT TO DENY USERS IN SSHD.CONFIG
RESTART SSH SERVICE
REBOOT SYSTEM